mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
fix: Plugin Factory, plugin view icon rendering
This commit is contained in:
parent
8f2cf98e4e
commit
de097c90dc
2 changed files with 141 additions and 5 deletions
35
database/factories/PluginFactory.php
Normal file
35
database/factories/PluginFactory.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Plugin;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class PluginFactory extends Factory
|
||||
{
|
||||
protected $model = Plugin::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'uuid' => $this->faker->uuid(),
|
||||
'user_id' => '1',
|
||||
'name' => $this->faker->randomElement(['Weather', 'Clock', 'News', 'Stocks', 'Calendar']),
|
||||
'data_payload' => null,
|
||||
'data_stale_minutes' => $this->faker->numberBetween(5, 300),
|
||||
'data_strategy' => $this->faker->randomElement(['polling', 'webhook']),
|
||||
'polling_url' => $this->faker->url(),
|
||||
'polling_verb' => $this->faker->randomElement(['get', 'post']),
|
||||
'polling_header' => null,
|
||||
'render_markup' => null,
|
||||
'render_markup_view' => null,
|
||||
'detail_view_route' => null,
|
||||
'icon_url' => null,
|
||||
'flux_icon_name' => null,
|
||||
'author_name' => $this->faker->name(),
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue