Add Destination resource (T2.2)
Migration/model/factory for destinations (name, mm_name, region, description fields, geo coordinates, is_active, popular) plus its Filament resource.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Catalog\Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Modules\Catalog\Models\Destination;
|
||||
|
||||
/**
|
||||
* @extends Factory<Destination>
|
||||
*/
|
||||
class DestinationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->city(),
|
||||
'mm_name' => fake()->city(),
|
||||
'region' => fake()->state(),
|
||||
'description' => fake()->sentence(),
|
||||
'mm_description' => null,
|
||||
'meta_keyword' => null,
|
||||
'meta_description' => null,
|
||||
'latitude' => fake()->latitude(),
|
||||
'longitude' => fake()->longitude(),
|
||||
'is_active' => true,
|
||||
'popular' => false,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user