コード例 #1
0
 public function getMore($excludes)
 {
     $excludes = explode("SEPARATOR", $excludes);
     $whereString = "";
     foreach ($excludes as $exclude) {
         $whereString = $whereString . "slug != ? AND ";
     }
     $whereString = substr($whereString, 0, -5);
     $works = Work::whereRaw($whereString, $excludes)->take(3)->orderBy("created_at", "desc")->get();
     return view("works.ajax")->with("works", $works);
 }