Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

basim's avatar
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')),
0 likes
0 replies

Please or to participate in this conversation.