RMH
RMH
FFilament
Created by RMH on 5/23/2024 in #❓┊help
Relation Manager Button not showing up
No description
5 replies
FFilament
Created by RMH on 9/17/2023 in #❓┊help
SQLSTATE[HY000]: General error: 1364 Field 'guardian_id' doesn't have a default value
I have a StudentResource and in form I am doing this:
Forms\Components\Select::make('guardian_id')
->relationship('guardian', 'family_name')
->label('Family')
->searchable()
->preload()
->required(),
Forms\Components\Select::make('guardian_id')
->relationship('guardian', 'family_name')
->label('Family')
->searchable()
->preload()
->required(),
But while creating a new student I am getting this error SQLSTATE[HY000]: General error: 1364 Field 'guardian_id' doesn't have a default value
7 replies
FFilament
Created by RMH on 8/26/2023 in #❓┊help
Suggestions for TextInput
Can we show suggestions for TextInput like we show for TagsInput? like a list of items and users can either select from those or write in text field themselves
5 replies
FFilament
Created by RMH on 8/17/2023 in #❓┊help
Trying to create bulk action to print invoices
I am trying to create a bulk action to print invoices/challans. I created a simple action with the help of https://github.com/chandraauliatama/InvoiceCreator and while creating a bulk action I am trying to do the same thing but instead of sending a single challan I am (doing something stupid maybe) trying to send a collection of challan in route.
Tables\Actions\BulkAction::make('Print Challans')
->icon('heroicon-o-printer')
->url(fn (Collection $records): string => route('print.challans', $records))
->openUrlInNewTab(),
Tables\Actions\BulkAction::make('Print Challans')
->icon('heroicon-o-printer')
->url(fn (Collection $records): string => route('print.challans', $records))
->openUrlInNewTab(),
the route is Route::get('challans/print', [PrintController::class, 'many'])->name('print.challans'); and the function in controller is
public function many(Collection $challans)
{
$printDate = Carbon::now()->format('jFY');
$fileName = "challans_{$printDate}";

return view('print.many', compact('challans', 'fileName'));
}
public function many(Collection $challans)
{
$printDate = Carbon::now()->format('jFY');
$fileName = "challans_{$printDate}";

return view('print.many', compact('challans', 'fileName'));
}
And the list page does not load. it gives me TypeError
App\Filament\Resources\ChallanResource::App\Filament\Resources\{closure}(): Argument #1 ($records) must be of type Illuminate\Database\Eloquent\Collection, null given, called in D:\school\eduf\vendor\filament\support\src\Concerns\EvaluatesClosures.php on line 35
App\Filament\Resources\ChallanResource::App\Filament\Resources\{closure}(): Argument #1 ($records) must be of type Illuminate\Database\Eloquent\Collection, null given, called in D:\school\eduf\vendor\filament\support\src\Concerns\EvaluatesClosures.php on line 35
Is there any other way to do it? A bulk action for printing
3 replies
FFilament
Created by RMH on 5/23/2023 in #❓┊help
Single entry from DatePicker or DateTimePicker
Is it possible to select only one field from DatePicker or DateTimePicker like only month or only year?
7 replies