app/Http/Controllers/HomeController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
Show the application dashboard.
@return \Illuminate\Contracts\Support\Renderable
Show the application dashboard . @return \ Illuminate \ Contracts \ Support \ Renderable
public function index()
    {
        $books = DB::table('books')->count();
        $categories = DB::table('categories')->count();
        $bookqty = DB::table('books')->sum('quantity');
        return view('home', compact('books', 'categories', 'bookqty'));
    }
public function index ( ) { $ books = DB :: table ( 'books' ) -> count ( ) ; $ categories = DB :: table ( 'categories' ) -> count ( ) ; $ bookqty = DB :: table ( 'books' ) -> sum ( 'quantity' ) ; return view ( 'home' , compact ( 'books' , 'categories' , 'bookqty' ) ) ; }
Show the application dashboard.
Show the application dashboard .