Hi I'm using laravel nova for create an admin panel. And I'm trying to use Date Field.
This is my migration,
$table->date('day')->nullable();
This is my my nova resource,
public function fields(Request $request)
{
return [
ID::make()->sortable(),
Date::make(__('Day'), 'day'),
];
}
This is my model,
class Menu extends Model
{
use HasTranslations;
public $translatable = ['name','description'];
protected $fillable = [
'name','description','typology', 'cost', 'day', 'active', 'buffet'
];
This is my error,
Date field must cast to 'date' in Eloquent model.
Do I need to do anything in resource ?