app/Http/Controllers/Admin/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()
    {
        $pageSize = config('app.pageSize');
        $book = Book::orderBy('book_id','desc')->paginate($pageSize);
        $book = $this->createTree($book);
        return view('admin.book.index',['book'=>$book]);
    }
public function index ( ) { $ pageSize = config ( 'app.pageSize' ) ; $ book = Book :: orderBy ( 'book_id' , 'desc' ) -> paginate ( $ pageSize ) ; $ book = $ this -> createTree ( $ book ) ; return view ( 'admin.book.index' , [ 'book' => $ book ] ) ; }
Display a listing of the resource.
Display a listing of the resource .
//$book = Book::all(); //调用无限极分类