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


PHP Activity::lists方法代碼示例

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


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

示例1: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $warehouse = Warehouse::findOrFail($id);
     $activities = Activity::lists('name', 'id');
     $types = Type::lists('name', 'id');
     return view('warehouses.edit', compact('warehouse', 'activities', 'types'));
 }
開發者ID:johanWP,項目名稱:pandora,代碼行數:13,代碼來源:WarehousesController.php

示例2: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //
     if (Auth::check()) {
         # code...
         if (Auth::user()->type == 1) {
             # code...
             $event = Event::findOrFail($id);
             $activities = Activity::lists('activity_name', 'id');
             return view('events.editEvent', compact('event', 'activities'));
         }
         return redirect('/');
     }
     return redirect('/');
 }
開發者ID:a-madhukar,項目名稱:Yahya,代碼行數:21,代碼來源:EventController.php

示例3: edit

 public function edit($id)
 {
     $company = Company::findOrFail($id);
     $activities = Activity::lists('name', 'id');
     return view('companies.edit', compact('company', 'activities'));
 }
開發者ID:johanWP,項目名稱:pandora,代碼行數:6,代碼來源:CompaniesController.php

示例4: lists

 public function lists($value, $key = '')
 {
     return \App\Activity::lists($value, $key);
 }
開發者ID:crow1796,項目名稱:technologyRIS,代碼行數:4,代碼來源:ActivityLogRepository.php

示例5: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $user = User::findOrFail($id);
     $activities = Activity::lists('name', 'id');
     /*        $warehouses = Warehouse::where('company_id', Auth::user()->current_company_id)->
               get()->
               lists('name', 'id');*/
     //        $warehouses = Warehouse::where('company_id', Auth::user()->current_company_id)->
     //        get()->
     //        lists('name', 'id');
     if (Auth::user()->currentCompany->parent == 1) {
         $warehouses = Warehouse::lists('name', 'id');
     } else {
         $warehouses = Warehouse::where('company_id', Auth::user()->current_company_id)->get()->lists('name', 'id');
     }
     $securityLevel = ['10' => 'Técnico', '20' => 'Supervisor', '30' => 'Jefe', '40' => 'Gerente', '50' => 'Director'];
     return view('users.edit', compact('user', 'activities', 'warehouses', 'securityLevel'));
 }
開發者ID:johanWP,項目名稱:pandora,代碼行數:24,代碼來源:UsersController.php


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