jeudi 4 juillet 2019

laravel Whoops, looks like something went wrong

laravel, I click the search button so there is an error message "Whoops, looks like Something went wrong."

public function kategori(Request $request) {

  $keyword = $request['keyword'];

  $kota = $request['city'];

  $City= City::where('nameCity','<>',$kota)->get();
  $Kate=Category::where('categoryType',$keyword)->get();


  // $branch = Branch::where('branchName','LIKE',"%{$keyword}%")->paginate(30);
  $branch = DB::table('mi_branch')->join('mi_resto_category', function ($join) use ($kota,$keyword)
   {
    $join->where('categoryType', 'LIKE', "%{$keyword}%");
   $join->on('mi_branch.branchCategory', '=', 'mi_resto_category.categoryId');})
  ->where('branchVenue','=',"{$kota}")->orWhere('branchAddress','LIKE',"%{$keyword}%")
  ->where('branchVenue','=',"{$kota}")->orWhere('branchName','LIKE',"%{$keyword}%")
  ->where('branchVenue','=',"{$kota}")->orWhere('branchPointRules','LIKE',"%{$keyword}%")
  ->where('branchVenue',"{$kota}")->get();

return view('v_bykategori',compact(['brand'],['branch'],['kota'],['City'],['Kate'],['keyword']));

enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire