/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function dashboard() { // $usercount = User::all()->count(); $activecount = User::where('status', '=', 1)->count(); $imagescount = Images::all()->count(); $albumcount = Album::all()->count(); return view('admin.dashboard')->with(['imagescount' => $imagescount, 'albumcount' => $albumcount, 'usercount' => $usercount, 'activeuser' => $activecount, 'fname' => 'Muhammad Adeel ']); }
public function getViewProduct($id) { $product = Products::findOrFail($id); $brands = Brands::all(); $models = Models::all(); $productImages = DB::table('product_images')->where('in_product', $id)->get(); $randProducts = Products::orderBy(DB::raw('RAND()'))->take(3)->get(); $randImages = Images::all(); $price_text = ''; if ($product->price_count == 'yes') { $price_text = 'за брой'; } return view('pages.view-product')->with('product', $product)->with('brands', $brands)->with('models', $models)->with('productImages', $productImages)->with('randProducts', $randProducts)->with('randImages', $randImages)->with('price_text', $price_text); }
public static function getImages() { return Images::all(); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $images = Images::all(); return view('gallery.index', compact('images')); }
public function getCart() { $content = Cart::content(); $images = Images::all(); return view('pages.cart')->with('content', $content)->with('images', $images); }