本文整理汇总了PHP中Facilities::join方法的典型用法代码示例。如果您正苦于以下问题:PHP Facilities::join方法的具体用法?PHP Facilities::join怎么用?PHP Facilities::join使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facilities
的用法示例。
在下文中一共展示了Facilities::join方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of the resource.
* GET /facilities
*
* @return Response
*/
public function index()
{
$facility = Facilities::join('facility_pic', 'facility.ID_Facility', '=', 'facility_pic.ID_Facility')->where('facility_pic.Main_Pic', '=', 'YES')->where('facility.Status', '=', 'Active')->paginate(5, ['facility.Facility_Name', 'facility_pic.Picture', DB::raw("CONCAT(SUBSTRING(facility.Description, 1, 100), '...') as isiFac"), 'facility.ID_Facility']);
$faciList = Facilities::where('Status', '=', 'Active')->get();
$data['room'] = Rooms::select('roomtype.RoomType_Name', 'roomtype.ID_RoomType', 'roomtype_pic.Picture')->join('roomtype_pic', 'roomtype.ID_RoomType', '=', 'roomtype_pic.ID_RoomType')->where('roomtype_pic.Main_Pic', '=', 'YES')->where('roomtype.Status', '=', 'Active')->take(40)->get()->all();
$data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all();
$data['about'] = About::get()->all();
return View::make('Facilities.index', compact('facility'))->with('faci_active', 'active')->with('faciList', $faciList)->with('data', $data);
}