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


PHP Category::lists方法代碼示例

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


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

示例1: edit

 public function edit($id, Category $category)
 {
     $product = $this->productsmodel->find($id);
     $categories = $category->lists('name', 'id');
     $tags = $product->tag_list;
     return view('products.edit', compact('product', 'categories'), compact('tags'));
 }
開發者ID:mborgesmartins,項目名稱:lcodecommerce,代碼行數:7,代碼來源:ProductsController.php

示例2: edit

 public function edit($id)
 {
     $list_options = ['Não', 'Sim'];
     $categories = Category::lists('name', 'id');
     $product = $this->productModel->find($id);
     return view('products.edit', compact('product', 'list_options', 'categories'));
 }
開發者ID:efraimsantana,項目名稱:CodeCommerce,代碼行數:7,代碼來源:AdminProductsController.php

示例3: edit

 public function edit($id, Category $category)
 {
     $categories = $category->lists('name', 'id');
     $product = $this->products->find($id);
     $tags = $product->tags->lists('name')->toArray();
     $tags = implode(",", $tags);
     return view('admin.products.edit', compact('product', 'categories', 'tags'));
 }
開發者ID:houstonfernandes,項目名稱:curso_laravel,代碼行數:8,代碼來源:AdminProductsController.php

示例4: edit

 public function edit($id, Category $category)
 {
     $categories = $category->lists('name', 'id');
     $product = $this->product->find($id);
     $tagsString = $this->product->transformaString($product->tags);
     return $this->factory->make('admin.products.edit', compact('product', 'categories', 'tagsString'));
     //return view('admin.products.edit', compact('product', 'categories', 'tagsString'));
 }
開發者ID:shuttzz,項目名稱:laravel-commerce,代碼行數:8,代碼來源:AdminProductsController.php

示例5: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id, Category $category, Tag $tag, Color $color)
 {
     // envio as categorias para a view products.create
     $categories = $category->lists('name', 'id');
     $product = $this->model->find($id);
     $tags = $tag->lists('name');
     $colors = $color->lists('name');
     return view('products.edit', compact('product', 'categories', 'tags', 'colors'));
 }
開發者ID:NiltonMorais,項目名稱:CodeCommerce,代碼行數:15,代碼來源:AdminProductsController.php

示例6: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit(Category $category, $id)
 {
     $product = $this->productModel->find($id);
     $categories = $category->lists('name', 'id');
     $tags = '';
     foreach ($product->tags as $tag) {
         $tags .= ' ' . $tag->name . ',';
     }
     return view('products.edit', compact('product', 'categories', 'tags'));
 }
開發者ID:alansslva,項目名稱:codecommerce,代碼行數:16,代碼來源:AdminProductsController.php

示例7: edit

 public function edit($id, Category $category)
 {
     $categories = $category->lists('name', 'id');
     $product = $this->productModel->find($id);
     $tags = array();
     for ($i = 0; $i < count($product->tags); $i++) {
         array_push($tags, $product->tags[$i]->name);
     }
     $tags = implode(', ', $tags);
     return view('products.edit', compact('product', 'categories', 'tags'));
 }
開發者ID:arliton,項目名稱:CodeCommerce,代碼行數:11,代碼來源:AdminProductsController.php

示例8: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id, Category $category)
 {
     $categories = $category->lists('name', 'id');
     $product = $this->productModel->find($id);
     $tags = $product->tags;
     $tags = $product->tags->lists('name');
     $tagFormatada = "";
     foreach ($tags as $t) {
         $tagFormatada .= trim($t) . ",";
     }
     $tagFormatada = trim($tagFormatada);
     return view('products.edit', compact('product', 'categories', 'tagFormatada'));
 }
開發者ID:mlslucio,項目名稱:e-commerce-school-of-net,代碼行數:19,代碼來源:ProductsController.php

示例9: edit

 public function edit($id, Category $category)
 {
     $categories = $category->lists('name', 'id');
     $produtos = $this->produtoModel->find($id);
     return view('produtos.edit', compact('produtos', 'categories'));
 }
開發者ID:sandrosales,項目名稱:laravel_commerce-Checkout03,代碼行數:6,代碼來源:ProdutosController.php

示例10: edit

 public function edit(Category $category, $id)
 {
     $categories = $category->lists('name', 'id');
     $product = $this->productModel->find($id);
     return view('products.edit', compact('product', 'categories'));
 }
開發者ID:eltonsantos,項目名稱:codecommerce,代碼行數:6,代碼來源:ProductsController.php

示例11: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id, Category $category)
 {
     $product = $this->product->find($id);
     $categories = $category->lists("name", 'id');
     return view('admin.products.edit', compact('product', 'categories'));
 }
開發者ID:kzoty,項目名稱:laravel_commerce,代碼行數:12,代碼來源:AdminProductsController.php

示例12: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @param Category $category
  * @return \Illuminate\Http\Response
  */
 public function edit($id, Category $category)
 {
     $product = $this->product->find($id);
     $categories = $category->lists('name', 'id');
     $categories->prepend('Select a category');
     return view('admin.products.form', compact('product', 'categories'));
 }
開發者ID:netoudi,項目名稱:laravel,代碼行數:14,代碼來源:AdminProductsController.php

示例13: edit

 public function edit($id, Category $category)
 {
     $product = $this->productModel->find($id);
     $categories = ['' => 'Select'] + $category->lists('name', 'id')->all();
     return view('products.edit', compact('product', 'categories'));
 }
開發者ID:andrejose,項目名稱:curso_laravel_commerce,代碼行數:6,代碼來源:ProductsController.php

示例14: edit

 public function edit($id, Category $category)
 {
     $product = $this->productModel->find($id);
     $categories = $category->lists('name', 'id');
     return view('products.edit', ['product' => $product, 'categories' => $categories]);
 }
開發者ID:jamesfsilva,項目名稱:code-commerce,代碼行數:6,代碼來源:AdminProductsController.php

示例15: edit

 public function edit(\CodeCommerce\Product $product, Category $category)
 {
     $categories = $category->lists('name', 'id');
     return view('products.edit', compact('product', 'categories'));
 }
開發者ID:eduardolcouto,項目名稱:laravel-commerce,代碼行數:5,代碼來源:AdminProductsController.php


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