当前位置: 首页>>代码示例>>PHP>>正文


PHP Language::lists方法代码示例

本文整理汇总了PHP中app\Language::lists方法的典型用法代码示例。如果您正苦于以下问题:PHP Language::lists方法的具体用法?PHP Language::lists怎么用?PHP Language::lists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Language的用法示例。


在下文中一共展示了Language::lists方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit(Employee $employee, Emplang $language)
 {
     $lang = ['0' => 'Select'] + Language::lists('name', 'id')->toArray();
     return view('backend.employees.language.edit', compact('employee', 'lang', 'language'));
 }
开发者ID:krizzna,项目名称:hrportal,代码行数:11,代码来源:EmplangController.php

示例2: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function edit(Photo $photo)
 {
     $languages = Language::lists('name', 'id')->toArray();
     $photoalbums = PhotoAlbum::lists('name', 'id')->toArray();
     return view('admin.photo.create_edit', compact('photo', 'languages', 'photoalbums'));
 }
开发者ID:xing393939,项目名称:Laravel-5-Bootstrap-3-Starter-Site,代码行数:12,代码来源:PhotoController.php

示例3: getSelectList

 /**
  * Get select list for languages
  *
  * @return mixed
  */
 protected function getSelectList()
 {
     return Language::lists('title', 'id')->all();
 }
开发者ID:amanullah-1,项目名称:laravel-5-simple-cms,代码行数:9,代码来源:Controller.php

示例4: edit

 /**
  * Show the form for editing the specified page.
  *
  * @param Page $page
  * @param FormBuilder $formBuilder
  * @return Response
  */
 public function edit(Page $page, FormBuilder $formBuilder)
 {
     $languages = Language::lists('title', 'id')->all();
     $form = $formBuilder->create('App\\Forms\\PagesForm', ['method' => 'PATCH', 'url' => route('admin.page.update', ['id' => $page->id]), 'model' => $page], $languages);
     return view('admin.pages.edit', compact('form', 'page'));
 }
开发者ID:abada,项目名称:laravel-5-simple-cms,代码行数:13,代码来源:PageController.php

示例5: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit(ArticleCategory $articlecategory)
 {
     $languages = Language::lists('name', 'id')->toArray();
     return view('admin.articlecategory.create_edit', compact('articlecategory', 'languages'));
 }
开发者ID:coralhust,项目名称:Laravel-5-Bootstrap-3-Starter-Site,代码行数:11,代码来源:ArticleCategoriesController.php

示例6: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $question = Question::findOrFail($id);
     if (!$question->canEdit()) {
         abort('403', 'Not authorized.');
     }
     $languages = Language::lists('name', 'id');
     return view('questions.edit', ['question' => $question, 'languages' => $languages]);
 }
开发者ID:alexpcoleman,项目名称:fitl,代码行数:15,代码来源:QuestionController.php

示例7: edit

 /**
  * Show the form for editing the specified category.
  *
  * @param Category $category
  * @param FormBuilder $formBuilder
  * @return Response
  */
 public function edit(Category $category, FormBuilder $formBuilder)
 {
     $languages = Language::lists('title', 'id')->all();
     $form = $formBuilder->create('App\\Forms\\CategoriesForm', ['method' => 'PATCH', 'url' => route('admin.category.update', ['id' => $category->id]), 'model' => $category], $languages);
     return view('admin.categories.edit', compact('form', 'category'));
 }
开发者ID:ungly,项目名称:laravel-5-simple-cms,代码行数:13,代码来源:CategoryController.php

示例8: boot

 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     // Currencies
     view()->composer(array('customers.edit', 'customer_invoices.create', 'companies.edit', 'customer_groups.create', 'customer_groups.edit'), function ($view) {
         $view->with('currencyList', \App\Currency::lists('name', 'id'));
     });
     // Customer Groups
     view()->composer(array('customers.edit'), function ($view) {
         $view->with('customer_groupList', \App\CustomerGroup::lists('name', 'id'));
     });
     // Payment Methods
     view()->composer(array('customers.edit', 'customer_invoices.create', 'customer_groups.create', 'customer_groups.edit'), function ($view) {
         $view->with('payment_methodList', \App\PaymentMethod::lists('name', 'id'));
     });
     // Sequences
     view()->composer(array('customers.edit', 'customer_invoices.create', 'customer_groups.create', 'customer_groups.edit'), function ($view) {
         $view->with('sequenceList', \App\Sequence::lists('name', 'id'));
     });
     // Invoice Template
     view()->composer(array('customers.edit', 'customer_invoices.create', 'customer_groups.create', 'customer_groups.edit'), function ($view) {
         $view->with('customerinvoicetemplateList', \App\Template::where('model_name', '=', 'CustomerInvoice')->lists('name', 'id'));
     });
     // Carriers
     view()->composer(array('customers.edit', 'customer_invoices.create', 'customer_groups.create', 'customer_groups.edit'), function ($view) {
         $view->with('carrierList', \App\Carrier::lists('name', 'id'));
     });
     // Sales Representatives
     view()->composer(array('customers.edit', 'customer_invoices.create'), function ($view) {
         $view->with('salesrepList', \App\SalesRep::select(DB::raw('concat (firstname," ",lastname) as name, id'))->lists('name', 'id'));
     });
     // Price Lists
     view()->composer(array('customers.edit', 'customer_groups.create', 'customer_groups.edit'), function ($view) {
         $view->with('price_listList', \App\PriceList::lists('name', 'id'));
     });
     // Warehouses
     view()->composer(array('products.create', 'stock_movements.create', 'configurationkeys.key_group_2', 'customer_invoices.create'), function ($view) {
         $whList = \App\Warehouse::with('address')->get();
         $list = [];
         foreach ($whList as $wh) {
             $list[$wh->id] = $wh->address->alias;
         }
         $view->with('warehouseList', $list);
         // $view->with('warehouseList', \App\Warehouse::lists('name', 'id'));
     });
     // Taxes
     view()->composer(array('customer_invoices.create', 'products.create', 'products.edit'), function ($view) {
         $view->with('taxList', \App\Tax::orderby('percent', 'desc')->lists('name', 'id'));
     });
     view()->composer(array('products.create', 'products.edit', 'customer_invoices.create'), function ($view) {
         $view->with('taxpercentList', \App\Tax::lists('percent', 'id'));
     });
     // Languages
     view()->composer(array('users.create', 'users.edit'), function ($view) {
         $view->with('languageList', \App\Language::lists('name', 'id'));
     });
     // Categories
     view()->composer(array('products.create', 'products._panel_main_data'), function ($view) {
         $view->with('categoryList', \App\Category::orderby('name', 'asc')->lists('name', 'id'));
     });
     // Stock Movement Types
     view()->composer(array('stock_movements.index', 'stock_movements.create'), function ($view) {
         $view->with('movement_typeList', \App\StockMovement::stockmovementList());
     });
 }
开发者ID:rogerapras,项目名称:aBillander,代码行数:69,代码来源:ViewComposerServiceProvider.php

示例9: index

 /**
  * Display form configure system
  *
  * @return Response
  */
 public function index()
 {
     $configures = Configure::lists('value', 'name');
     $languages = Language::lists('language_name', 'code');
     return view('configures.configure', compact('configures', 'languages'));
 }
开发者ID:phanngoc,项目名称:internal-tool,代码行数:11,代码来源:ConfigureController.php


注:本文中的app\Language::lists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。