sumitgroup
2 months ago
633
6
Laravel

How to get Current page Title in Laravel?

Posted 2 months ago by sumitgroup

i have some fields in my database table, and i want to display title,description and keywords according to every page, Please let me know how i can display this. My database fields name are metatitle,metadesc,keyword

Here are my Controller code where i am displaying the property list...

 public function listtype($slug){
    $prtype= Listing::whereHas('proType',function($q) use($slug){
        $q->where('slug','like','%'.$slug.'%');
    })->paginate(50);
    return view('property-type',compact('prtype','title'));
}

Please sign in or create an account to participate in this conversation.