/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // $books = Book::get(); // return view('page.index'); return Response::json(array('books' => $books->toArray()), 200, array('Access-Control-Allow-Origin' => '*')); }
public function getAll() { // Get All Books $books = Book::get(); // Passing data to response service return $this->responseService->returnMessage($books, 'No Books were Found.'); }
public function __construct() { $this->books = Book::get(); $this->files = File::get(); }
public function info() { $settings = Setting::first(); $books = Book::get(); return view('front.info', ['books' => $books, 'settings' => $settings, 'cleanEmail' => Self::hide_email($settings->email)]); }