app/Http/Controllers/BookController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Request $request)
    {
        $books = Book::all();
        return response()->json($books);
    }
public function index ( Request $ request ) { $ books = Book :: all ( ) ; return response ( ) -> json ( $ books ) ; }
Display a listing of the resource.
Display a listing of the resource .