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']));
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2KY5sUa
via IFTTT
Aucun commentaire:
Enregistrer un commentaire