I'm trying to send a success message with a compact but it didn't work for me a message does not appear?
public function index(Request $request)
{
$brand=$request->get('searchbrand');
$model=$request->get('searchmodel');
$cars=car::where('brand','like','%'.$brand.'%')
->where(function ($query)use($model) {
$query->where('model','like','%'.$model.'%');
})->get();
return view('cars.index',compact('cars'))
->with('success','Results Car');
}