app/Http/Controllers/BooksController.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()
    {
        $books = Book::where('user_id', Auth::user()->id)->get();
        return view ('books/index', compact('books'));
    }
public function index ( ) { $ books = Book :: where ( 'user_id' , Auth :: user ( ) -> id ) -> get ( ) ; return view ( 'books/index' , compact ( 'books' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .