Open mariuscirstea opened 3 years ago
you can try..catch at handle() method for example
public function handle(ActionFields $fields, Collection $models)
{
try {
Excel::import(new TicketsImport, $fields->file);
return Action::message('Tickets Succesfully Imported!');
} catch (\Maatwebsite\Excel\Validators\ValidationException $e) {
return Action::danger($e->errors());
}
}
How can we display validation errors inside Nova?