當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Brand::all方法代碼示例

本文整理匯總了PHP中Brand::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Brand::all方法的具體用法?PHP Brand::all怎麽用?PHP Brand::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Brand的用法示例。


在下文中一共展示了Brand::all方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //
     $product = Product::find($id);
     $type = ProductType::all();
     $brand = Brand::all();
     return View::make('product.edit')->withProduct($product)->withBrand($brand)->withType($type);
 }
開發者ID:abrahammontas,項目名稱:Supplements-online-store,代碼行數:14,代碼來源:ProductsController.php

示例2: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $product = Product::find($id);
     $departments = Department::all()->lists('name', 'id');
     $categories = Category::all()->lists('name', 'id');
     $brands = Brand::all()->lists('name', 'id');
     $sizes = Size::all()->lists('name', 'id');
     $colors = Color::all()->lists('name', 'id');
     return View::make('admin::products.edit', compact('product', 'departments', 'categories', 'brands', 'sizes', 'colors'));
 }
開發者ID:hiten1986,項目名稱:LaravelWebshopAdmin,代碼行數:16,代碼來源:AdminProductsController.php

示例3: showBrands

 public function showBrands()
 {
     Larasset::start('footer')->js('dataTables-min', 'dataTables-bootstrap', 'bootstrap_editable');
     Larasset::start('header')->css('bootstrap_editable');
     $ids = Brand::all()->lists('id');
     if (!empty($ids)) {
         $this->_monitorChildrenStatus($ids);
     }
     $data['brands'] = Brand::all();
     $this->layout->title = "Active Brands of products";
     $this->layout->content = View::make('admin.liststock.stocks', $data);
 }
開發者ID:sliekasirdis79,項目名稱:POS,代碼行數:12,代碼來源:StockBrandController.php

示例4: index

 public static function index()
 {
     return function ($req, $res) {
         $res->header('Content-Type', 'application/json');
         $models = Brand::all();
         $all = array();
         foreach ($models as $model) {
             # code...
             $all[] = $model->as_array();
         }
         echo json_encode($all);
     };
 }
開發者ID:samdubey,項目名稱:ads2,代碼行數:13,代碼來源:brandctrl.php

示例5: GetAllBrand

 public function GetAllBrand()
 {
     return Brand::all();
 }
開發者ID:hungleon2112,項目名稱:giaymaster,代碼行數:4,代碼來源:Brand.php

示例6: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $brand = Brand::all();
     View::share('selected_option', 'Agregar Marca');
     return View::make('brand.add')->with('brand', $brand);
 }
開發者ID:abrahammontas,項目名稱:Supplements-online-store,代碼行數:11,代碼來源:BrandController.php

示例7: edit_product

 public function edit_product()
 {
     $id = Request::segment(4) ? Request::segment(4) : 0;
     $sub_title = Request::segment(4) ? "Edit Product" : "Add Product";
     $product = Product::find($id);
     $brands = Brand::all();
     $stores = Store::all();
     $selected_store_id = 0;
     $selected_department_id = 0;
     $selected_shelf_id = 0;
     foreach ($stores as $store) {
         $selected_store_id = $store->id;
         break;
     }
     if ($product && $product->store_id) {
         $selected_store_id = $product->store_id;
     }
     $departments = Department::where('store_id', $selected_store_id)->get();
     foreach ($departments as $department) {
         $selected_department_id = $department->id;
         break;
     }
     if ($product && $product->department_id) {
         $selected_department_id = $product->department_id;
     }
     $shelves = Shelf::where('department_id', $selected_department_id)->get();
     foreach ($shelves as $shelf) {
         $selected_shelf_id = $shelf->id;
         break;
     }
     return View::make('admin.product_form')->with('title', 'Product')->with('sub_title', $sub_title)->with('product', $product)->with('brands', $brands)->with('stores', $stores)->with('departments', $departments)->with('shelves', $shelves)->with('selected_store_id', $selected_store_id)->with('selected_department_id', $selected_department_id)->with('selected_shelf_id', $selected_shelf_id);
 }
開發者ID:sohelrana820,項目名稱:mario-gomez,代碼行數:32,代碼來源:AdminController.php

示例8: getIndex

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getIndex()
 {
     return View::make('main.brands')->with('brands', Brand::all());
 }
開發者ID:bytebybyte,項目名稱:laravel-ecommerce,代碼行數:9,代碼來源:BrandsController.php

示例9: get_product_add

 public function get_product_add()
 {
     $categories = Category::where('top', '=', '1')->get();
     $products = Product::all();
     $brands = Brand::all();
     $tags = DB::table("product_descriptions")->get('tag');
     $_tmpholder = array();
     $_strholder = '';
     foreach ($tags as $tag) {
         $_instance = explode(',', $tag->tag);
         foreach ($_instance as $item) {
             array_push($_tmpholder, $item);
         }
     }
     $_tmpholder = array_unique($_tmpholder);
     $numItems = count($_tmpholder);
     $i = 0;
     foreach ($_tmpholder as $item) {
         $_strholder .= '"' . $item . '"';
         if (++$i !== $numItems) {
             $_strholder .= ',';
         }
     }
     $attributes = AttributeGroup::with('getChildrenGroup')->where('top', '=', 1)->get();
     $taxes = Tax::all();
     return View::make('administrator.product_add')->with('categories', $categories)->with('products', $products)->with('brands', $brands)->with('tags', $_strholder)->with('attributes', $attributes)->with('taxes', $taxes);
 }
開發者ID:TahsinGokalp,項目名稱:L3-Eticaret,代碼行數:27,代碼來源:admin.php

示例10: function

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::get('brand', function () {
    $categories = Category::all();
    $brands = Brand::all();
    return View::make('index')->with('categories', $categories)->with('brands', $brands);
});
開發者ID:Lucent-Beam,項目名稱:pivot_table,代碼行數:17,代碼來源:routes.php

示例11: companyCounterStat

 public function companyCounterStat()
 {
     $this->widgetData = array('count' => count(Brand::all()));
     $this->setupWidgetLayout(__METHOD__);
 }
開發者ID:sgh1986915,項目名稱:laravel-bizgym,代碼行數:5,代碼來源:AppWidget.php

示例12: getAll

 public function getAll()
 {
     $categories = Category::all();
     $brands = Brand::all();
     return View::make('Attch/index')->with('categories', $categories)->with('brands', $brands);
 }
開發者ID:PaoloPaz,項目名稱:crud_ajax_laravel_4.2,代碼行數:6,代碼來源:BrandController.php


注:本文中的Brand::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。