dsqd
This commit is contained in:
parent
ce899d81c1
commit
e2b3b2ce45
@ -24,7 +24,7 @@ class APIController extends Controller {
|
||||
if(!empty($reg))
|
||||
$res = Referent::where('nom', 'like', '%'.$reg.'%')->orWhere('prenom', 'like', '%'.$reg.'%')->select(['nom', 'prenom', 'image', 'id'])->get();
|
||||
else
|
||||
$res = Referent::get(5);
|
||||
$res = Referent::take(5)->select(['nom', 'prenom', 'image', 'id'])->get();
|
||||
return Response::json($res->toArray());
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@ class HomeController extends Controller {
|
||||
|
||||
public function choisirRef()
|
||||
{
|
||||
return view('frontend/home',['referents' => Referent::get()]);
|
||||
$refs = Referent::take(5)->select(['nom', 'prenom', 'image', 'id'])->get();
|
||||
return view('frontend/home',['referents' => $refs]);
|
||||
}
|
||||
|
||||
public function changerRef($idRef)
|
||||
|
Reference in New Issue
Block a user