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,41 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Catalog\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Modules\Catalog\Database\Factories\DestinationFactory;
|
||||
|
||||
class Destination extends Model
|
||||
{
|
||||
/** @use HasFactory<DestinationFactory> */
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'mm_name',
|
||||
'region',
|
||||
'description',
|
||||
'mm_description',
|
||||
'meta_keyword',
|
||||
'meta_description',
|
||||
'latitude',
|
||||
'longitude',
|
||||
'is_active',
|
||||
'popular',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_active' => 'boolean',
|
||||
'popular' => 'boolean',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user