我的数据库表中有一些字段,我想根据每一页显示onDrawOver()
,title
和description
,请让我知道如何显示此内容。我的数据库字段名称为keywords
,metatitle
,metadesc
这是我正在显示属性列表的控制器代码...
keyword
答案 0 :(得分:0)
您可以通过以下方式进行操作:
public function listtype($slug){
$prtype= Listing::whereHas('proType',function($q) use($slug){
$q->where('slug','like','%'.$slug.'%');
})->with('proType')->paginate(50);
dd($prtype); /** for checking **/
return view('property-type',compact('prtype', $prtype));
}