Ejemplo n.º 1
0
 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";
 }
Ejemplo n.º 2
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function books()
 {
     $books = Book::orderBy('created_at', 'DESC')->get();
     return view('books', ['books' => $books]);
 }
Ejemplo n.º 3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $data = Book::orderBy('updated_at', 'desc')->get();
     return response()->json($data);
 }