コード例 #1
0
 /**
  * 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 ']);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
ファイル: Images.php プロジェクト: timurAbl93/site
 public static function getImages()
 {
     return Images::all();
 }
コード例 #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $images = Images::all();
     return view('gallery.index', compact('images'));
 }
コード例 #5
0
 public function getCart()
 {
     $content = Cart::content();
     $images = Images::all();
     return view('pages.cart')->with('content', $content)->with('images', $images);
 }