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


PHP Location::lists方法代码示例

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


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

示例1: edit

 public function edit($id)
 {
     $activity = Activity::find($id);
     $cars = Car::lists('name', 'id');
     $customers = Customer::lists('name', 'id');
     $locations = Location::lists('name', 'id');
     $costs = null;
     $items = null;
     $ondayOtherCosts = null;
     if ($activity->type == "On Day") {
         $data = Onday::where('activity_id', '=', $id)->get()->pop();
         $ondayOtherCosts = OndayOtherCost::where('onday_id', $data->id)->get();
     } else {
         if ($activity->type == "Maintenance") {
             $data = Maintenance::where('activity_id', '=', $id)->get()->pop();
             $costs = $activity->maintenance->items;
             $items = Item::lists('name', 'id')->sort();
         } else {
             if ($activity->type == "Nil") {
                 $data = Nil::where('activity_id', '=', $id)->get()->pop();
             }
         }
     }
     return view('activity.edit', ['activity' => $activity, 'data' => $data, 'cars' => $cars, 'customers' => $customers, 'locations' => $locations, 'costs' => $costs, 'items' => $items, 'ondayOtherCosts' => $ondayOtherCosts]);
 }
开发者ID:jubaedprince,项目名称:rkt,代码行数:25,代码来源:ActivityController.php

示例2: doChooseEmployee

 /**
  * User chose single employee from dropdown to be edited
  *
  * @param Request $request
  * @return mixed
  */
 public function doChooseEmployee(Request $request)
 {
     $employee = Employee::find($request->input('choose'));
     $dept = ['' => 'Choose...'] + Department::lists('name', 'id')->all();
     $location = ['' => 'Choose...'] + Location::lists('name', 'id')->all();
     return view('admin.edit-employee', compact('dept', 'location', 'employee'));
 }
开发者ID:heidilux,项目名称:Laravel-Company-Directory,代码行数:13,代码来源:EmployeeController.php

示例3: addProducts

 public function addProducts($id)
 {
     $requesition = $this->requesition->with(['items'])->where('id', $id)->first();
     $locations = Location::lists('name', 'id');
     $locationLists = [null => trans('main.label.select')];
     if ($locations != null) {
         $locationLists = $locationLists + $locations->toArray();
     }
     return view('requesitions.add_product', ['requesition' => $requesition, 'items' => $requesition->items, 'locationLists' => $locationLists]);
 }
开发者ID:vasitjuntong,项目名称:mixed,代码行数:10,代码来源:RequesitionController.php

示例4: processOndayFormView

 public function processOndayFormView()
 {
     $activities = Activity::orderBy('created_at', 'desc')->take(10)->get();
     $customers = Customer::lists('name', 'id');
     $locations = Location::lists('name', 'id')->sort();
     $activity = Session::get('activity');
     $ondayOtherCostItems = OndayOtherCostItem::lists('name', 'id');
     // Session::forget('activity');
     return view('home', ['type' => '1', 'activity' => $activity, 'customers' => $customers, 'locations' => $locations, 'activities' => $activities, 'ondayOtherCostItems' => $ondayOtherCostItems]);
 }
开发者ID:jubaedprince,项目名称:rkt,代码行数:10,代码来源:HomeController.php

示例5: scraper

 /**
  * Show the application welcome screen to the user.
  *
  * @return Response
  */
 public function scraper()
 {
     $success = '';
     $groups = Group::lists('name', 'group_id');
     $locations = Location::lists('location', 'location_id');
     //$tournaments = Tournament::orderBy('start_date', 'desc')
     //	->lists('name','tournament_id');
     $tournaments = Tournament::selectRaw('CONCAT(name, " (", start_date, ")") as name, tournament_id')->orderBy('start_date', 'desc')->lists('name', 'tournament_id');
     $players = Player::select('first_name', 'last_name', 'player_id', \DB::raw('CONCAT(first_name, " ", last_name) as full_name'))->orderBy('first_name')->orderBy('last_name')->get()->lists('full_name', 'player_id');
     return view('admin.scraper', compact('groups', 'locations', 'tournaments', 'players', 'success'));
 }
开发者ID:jenidarnold,项目名称:racquetball,代码行数:16,代码来源:ScreenScrapeController.php

示例6: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker\Factory::create();
     $locations = Location::lists('id')->all();
     $limit = 3;
     foreach ($locations as $location) {
         for ($i = 0; $i < $limit; $i++) {
             DB::table('stories')->insert(['location_id' => $location, 'title' => $faker->sentence, 'story' => $faker->text, 'published' => $faker->boolean]);
         }
     }
 }
开发者ID:piyushbjadhav,项目名称:Programming-Assignments,代码行数:16,代码来源:StoriesTableSeeder.php

示例7: addProducts

 public function addProducts($id)
 {
     $receive = Receive::with(['receiveItems', 'receiveItems.product', 'receiveItems.product.unit'])->whereId($id)->whereStatus(Receive::CREATE)->first();
     if ($receive == null) {
         flash()->error(trans('receive.label.name'), trans('receive.message_alert.warning_receive_is_not_create'));
         return redirect()->back();
     }
     $locations = Location::lists('name', 'id');
     $locationLists = [null => trans('main.label.select')];
     if ($locations != null) {
         $locationLists = $locationLists + $locations->toArray();
     }
     $receiveItems = $receive->receiveItems()->orderBy('id', 'asc')->get();
     return view('receives.add_product', compact('receive', 'products', 'locationLists', 'receiveItems'));
 }
开发者ID:vasitjuntong,项目名称:mixed,代码行数:15,代码来源:ReceiveController.php

示例8: create

 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $locations = App\Location::lists('name', 'id');
     $subcontractors = App\Subcontractor::lists('subcontractor_name', 'id');
     return view('assignments.create', compact('locations', 'locations', 'subcontractors', 'subcontractors'));
 }
开发者ID:Vladzor,项目名称:laravelpractice,代码行数:11,代码来源:AssignmentController.php

示例9: edit

 public function edit($id)
 {
     $chart = Chart::findOrFail($id);
     $locations = Location::lists('name', 'id');
     $units = ChartUnit::lists('unit', 'id');
     $types = ChartType::lists('type', 'id');
     $auth = $chart->auth;
     $visible = $chart->visible;
     return view('partials.editChart', compact('chart', 'locations', 'units', 'types', 'auth', 'visible'));
 }
开发者ID:birgirob,项目名称:TiSDaV,代码行数:10,代码来源:ChartController.php

示例10: index

 public function index()
 {
     JavaScript::put(['loggedIn' => Auth::check()]);
     $locations = Location::lists('name', 'id');
     return View::make('home', compact('locations'));
 }
开发者ID:birgirob,项目名称:TiSDaV,代码行数:6,代码来源:HomeController.php

示例11: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $locations = Location::lists('name', 'id');
     $payment_methods = Payment_Method::lists('name', 'id');
     $all_memberships = Membership::orderBy('created_at', 'desc')->get();
     $memberships = $all_memberships->lists('name', 'id');
     $admins = User::Admins()->get();
     $supervisors = $admins->lists('fullname', 'id');
     $instructors = User::Instructors()->get()->lists('fullname', 'id');
     $class = Classe::findOrFail($id);
     return view('classes.edit', compact('class', 'locations', 'payment_methods', 'supervisors', 'memberships', 'instructors'));
 }
开发者ID:ripixel,项目名称:polefitness,代码行数:18,代码来源:ClassesController.php


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