当前位置: 首页>>代码示例>>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;未经允许,请勿转载。