Is there a way to simplify these three lines to create multiple flash messages?
session()->flash('status', 'error'); session()->flash('title', 'test title'); session()->flash('message', 'test message');
I tried it but it doesn’t work
return view('panel.codes.CodeCrud.create', [ 'categories' => collect(), 'cards' => collect(), ])->with([ 'status' => 'error', 'title' => 'test title', 'message' => 'test message', ]);
You can pass an array as the second parameter to session()->flash