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()
    {
        $categories = DB::table('categories')->count();
        $products = DB::table('products')->count();
        $users = DB::table('customers')->count();
        $orders = DB::table('orders')->count();
        return view('back.dashboard.index', compact(['categories', 'products', 'users', 'orders']));
    }
public function index ( ) { $ categories = DB :: table ( 'categories' ) -> count ( ) ; $ products = DB :: table ( 'products' ) -> count ( ) ; $ users = DB :: table ( 'customers' ) -> count ( ) ; $ orders = DB :: table ( 'orders' ) -> count ( ) ; return view ( 'back.dashboard.index' , compact ( [ 'categories' , 'products' , 'users' , 'orders' ] ) ) ; }
Show the application dashboard.
Show the application dashboard .