Mar 13, 2024
0
Level 1
help in filament php
Hello, i am building a simple leave system for employees in filament a made all tables and migrations and relationships but i got this error: SQLSTATE[HY000]: General error: 1364 Field 'employee_id' doesn't have a default value and this is the code for leave resource: class LeaveResource extends Resource { protected static ?string $model = Leave::class;
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
public static function form(Form $form): Form
{
return $form
->schema([
select::make('employee_name')->label('الاسم الكامل')
->options(employee::all()->pluck('name','id')),
Please or to participate in this conversation.