function index() { $terbaru = Book::orderBy('BookID', 'desc')->skip(0)->take(6)->get(); $data['categories'] = $this->categories; $data['terbaru'] = $terbaru; if (Auth::member() != null) { $data['member'] = Auth::member(); } $this->view->render('home', $data); $this->view->data = "asu"; }
/** * Show the application dashboard to the user. * * @return Response */ public function books() { $books = Book::orderBy('created_at', 'DESC')->get(); return view('books', ['books' => $books]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data = Book::orderBy('updated_at', 'desc')->get(); return response()->json($data); }