app/Http/Controllers/ShopController.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()
    {
        $product = Products::orderby('updated_at','desc')->get();
        $fearured = Products::where('featured', 'Yes')->orderby('updated_at','desc')->get();
        $new_arrival = Products::orderby('created_at','desc')->limit('10')->get();
        return view('shop.index',compact('fearured','product','new_arrival'));
    }
public function index ( ) { $ product = Products :: orderby ( 'updated_at' , 'desc' ) -> get ( ) ; $ fearured = Products :: where ( 'featured' , 'Yes' ) -> orderby ( 'updated_at' , 'desc' ) -> get ( ) ; $ new_arrival = Products :: orderby ( 'created_at' , 'desc' ) -> limit ( '10' ) -> get ( ) ; return view ( 'shop.index' , compact ( 'fearured' , 'product' , 'new_arrival' ) ) ; }
Show the application dashboard.
Show the application dashboard .
// $user_id = auth()->user()->id; // $user = User::find($user_id); // $user = User::where('id', auth()->user()->id)->first(); // $cart = Orders::where('user_id', auth()->user()->id)->where('status','Pending')->orderby('created_at','desc')->get(); // $wallet = wallet::where('user_id', auth()->user()->id)->first(); // return view('dashboard.index',compact('wallet','lastposts','myref','lvl1','lvl2','lvl3','lvl4','myref_code','lvl1_code','lvl2_code','lvl3_code'))->with('UserCaptcha', $user->UserCaptcha);