I have a page sending the parameter to this code, after which it performs a selection from the numbers database but also displays all posts including those that are not published, and then the question was raised how exactly the second parameter would be given which would not be given published info
Here is my code at the moment, but unfortunately it just leads to an error =)
public function search(){ /* $numb = Numbers::where("nmb_title",Request::input('nmb_title').'-'.Request::input('nmb_title1').'-'.Request::input('nmb_title2'))->get();*/ $nmb = Request::input('nmb_title').'-'.Request::input('nmb_title1').'-'.Request::input('nmb_title2'); $posta = Posts::where("published",1)-> $numb = Numbers::where('nmb_title',$nmb)->get(); /*$numb = Numbers::where('nmb_title',$nmb) -> Posts::where("published",1) ->get();*/ dd($numb); return view('search', compact('numb','posta'));
->$ numb = Numbers :: where ('nmb_title', $ nmb) -> get (); ` - apelsinka223