Add CatalogPlugin scaffold and EvCompany resource (T2.0, T2.1)
Registers CatalogPlugin with the admin panel so catalog Filament resources auto-discover, and adds the EvCompany model/migration/ factory plus its Filament resource (auto-generated slug on create).
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Catalog\Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Modules\Catalog\Models\EvCompany;
|
||||
|
||||
/**
|
||||
* @extends Factory<EvCompany>
|
||||
*/
|
||||
class EvCompanyFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->company(),
|
||||
'mm_name' => fake()->company(),
|
||||
'slug' => fake()->unique()->slug(),
|
||||
'description' => fake()->sentence(),
|
||||
'mm_description' => null,
|
||||
'contact' => fake()->phoneNumber(),
|
||||
'address' => fake()->address(),
|
||||
'logo' => null,
|
||||
'is_active' => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user