- Added standard Laravel directory structure and configuration. - Included Svelte and Tailwind configuration for the admin interface. - Added core PHPUnit and testing scripts.
29 lines
485 B
PHP
29 lines
485 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class CustomField extends Model
|
|
{
|
|
protected $fillable = [
|
|
'custom_post_type_id',
|
|
'label',
|
|
'name',
|
|
'type',
|
|
'options',
|
|
'required',
|
|
'sort_order',
|
|
];
|
|
|
|
protected $casts = [
|
|
'options' => 'array',
|
|
'required' => 'boolean',
|
|
];
|
|
|
|
public function customPostType()
|
|
{
|
|
return $this->belongsTo(CustomPostType::class);
|
|
}
|
|
}
|