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