EL REKT
Explore posts from serversRedirect to index after creation
I used modification when creating a record with the
handleRecordCreation
function, but the function to create notifications and redirect to index doesn't work, is there a proper way to solve this? so far that's what I've done..
protected function handleRecordCreation(array $data): Model
{
$create = DB::select(
'EXEC create_ticket ?, ?, ?, ?, ?, ?, ?',
[
$data['location_id'],
$data['priority_id'],
$data['type_id'],
$data['created_by'],
$data['ticket_name'],
$data['ticket_desc'],
$data['images'],
]
);
$id = DB::scalar('SELECT ' . $create[0]->Id);
return TicketHeader::find($id);
}
protected function afterCreate(): void
{
Notification::make()
->success()
->title('Ticket Created!')
->body('Trouble ticket created successfully.');
}
protected function getRedirectUrl(): string
{
return $this->getResource()::getUrl('index');
}
10 replies
Route in Nested Resources
I created nested resources by following the steps from here: https://laraveldaily.com/post/filament-v3-nested-resources-trait-pages
but I still have 1 more resource under child resource (in this case under LessonResource), how do I write the route?
5 replies
How to integrate filament v3 with stored procedure
I want to use stored procedures for CRUD needs. But I'm confused about how to call the stored procedure function from the create/edit button, or when I want to display the resulting data from the stored procedure in a table. anyone can help ?
3 replies