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


PHP Location::all方法代码示例

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


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

示例1: run

 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 20) as $index) {
         CalendarEvent::create(['event_name' => $faker->bs, 'creator_id' => User::all()->random()->id, 'location_id' => Location::all()->random()->id, 'start_time' => $faker->time, 'end_time' => $faker->time, 'cost' => $faker->numberBetween($min = 25, $max = 500), 'description' => $faker->text($maxNbChars = 200), 'event_image' => $faker->image]);
     }
 }
开发者ID:Bare-Bones-Events,项目名称:Event-Planner,代码行数:7,代码来源:CalendarEventsTableSeeder.php

示例2: getMasterDatas

 private function getMasterDatas()
 {
     $data['categories'] = Category::orderBy('title')->get();
     View::share('categories', $data['categories']);
     $data['locations'] = Location::all();
     View::share('locations', $data['locations']);
 }
开发者ID:huuson94,项目名称:btlltct,代码行数:7,代码来源:FEBaseController.php

示例3: create

 /**
  * Show the form for creating a new order
  *
  * @return Response
  */
 public function create()
 {
     $items = Item::all();
     $customers = Client::all();
     $locations = Location::all();
     return View::make('orders.create', compact('items', 'locations', 'customers'));
 }
开发者ID:kenkode,项目名称:gasexpress,代码行数:12,代码来源:OrdersController.php

示例4: action_edit

 public function action_edit($id)
 {
     if (Auth::check() && Session::has('id')) {
         $account = Account::find(Session::get('id'));
         $location = Location::find($id);
         if (Input::has('address') && Input::has('city') && Input::has('postal_code')) {
             if ($account->id == $location->account_id) {
                 Input::has('address') ? $location->address = strip_tags(Input::get('address')) : ($location->address = '');
                 Input::has('city') ? $location->city = strip_tags(Input::get('city')) : ($location->city = '');
                 Input::has('postal_code') ? $location->postal_code = strip_tags(Input::get('postal_code')) : ($location->postal_code = '');
                 $location->save();
                 return Redirect::to("/account/myLocations");
             } else {
                 return Redirect::to("/account/myLocations");
             }
         } else {
             if ($location->account_id == $account->id) {
                 $locations = Location::all();
                 $view = View::make('location.edit.index')->with('title', 'Edit Location')->with('location', $location)->with('locations', $locations);
                 return $view;
             } else {
                 return Response::error('403');
             }
         }
     } else {
         return Redirect::to('/');
     }
 }
开发者ID:angmark0309,项目名称:remarket,代码行数:28,代码来源:location.php

示例5: locations

 public function locations()
 {
     $locations = Location::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.locationsReport', compact('locations', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Stores List.pdf');
 }
开发者ID:arapmelly,项目名称:xaraerp,代码行数:7,代码来源:ErpReportsController.php

示例6: index

 public function index()
 {
     $rooms = Room::all();
     $locations = Location::all();
     $menu = 'data';
     return View::make('rooms.index', compact('rooms', 'locations', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:7,代码来源:RoomsController.php

示例7: down

 /**
  * Revert the changes to the database.
  *
  * @return void
  */
 public function down()
 {
     //
     $locations = Location::all();
     foreach ($locations as $location) {
         $location->delete();
     }
 }
开发者ID:angmark0309,项目名称:remarket,代码行数:13,代码来源:2013_02_27_212519_insert_locations.php

示例8: create

 public function create()
 {
     $locations = Location::all();
     $courses = Course::where('location_id', '=', Auth::user()->location_id)->get();
     $employees = Employee::all();
     $menu = 'student';
     return View::make('movements.create', compact('locations', 'courses', 'employees', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:8,代码来源:MovementsController.php

示例9: index

 public function index()
 {
     $users = User::all();
     $employees = Employee::all();
     $locations = Location::all();
     $menu = 'data';
     return View::make('users.index', compact('users', 'employees', 'locations', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:8,代码来源:UsersController.php

示例10: edit

 public function edit($id)
 {
     $activity = Activity::find($id);
     $generations = Generation::all();
     $locations = Location::all();
     $menu = 'project';
     return View::make('activities.edit', compact('activity', 'generations', 'locations', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:8,代码来源:ActivitiesController.php

示例11: familyLoc

 public static function familyLoc($family)
 {
     $flocations = [];
     foreach ($family as $f) {
         $l = \Location::all(["user_id = ?" => $f->user_id], ["*"], "created", "desc");
         $flocations = array_merge($flocations, $l);
     }
     return $flocations;
 }
开发者ID:HLitmus,项目名称:WebApp,代码行数:9,代码来源:patient.php

示例12: index

 public function index()
 {
     $currProject = Auth::user()->curr_project_id;
     $currLocation = Auth::user()->location_id;
     $projects = Project::all();
     $locations = Location::all();
     $menu = 'setup';
     return View::make('setups/index', compact('projects', 'locations', 'currProject', 'currLocation', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:9,代码来源:SetupsController.php

示例13: create

 /**
  * Show the form for creating a new resource.
  * GET /calendarevents/create
  *
  * @return Response
  */
 public function create()
 {
     $locations = Location::all();
     $dropdown = [];
     $dropdown['-1'] = 'Add New Address';
     foreach ($locations as $location) {
         $dropdown[$location->id] = $location->title;
     }
     return View::make('events.create')->with('dropdown', $dropdown);
 }
开发者ID:BobFromAccounting,项目名称:events.dev,代码行数:16,代码来源:CalendarEventsController.php

示例14: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $donors = [''] + Donor::all()->lists('name_with_blood_group', 'id');
     $products = [''];
     foreach (Category::all() as $cat) {
         $cat_products = $cat->products->lists('name', 'id');
         $products[$cat->name] = $cat_products;
     }
     $locations = [''] + Location::all()->lists('name_with_parent', 'id');
     return View::make('donations.create', ['donors' => $donors, 'products' => $products, 'locations' => $locations, 'today' => Carbon\Carbon::now()]);
 }
开发者ID:alexixim,项目名称:blood-bank,代码行数:16,代码来源:DonationController.php

示例15: allLocations

 public function allLocations()
 {
     $new = array();
     $locations = Location::all();
     foreach ($locations as $location) {
         $ven = Vendor::find($location->vendor_id);
         $location['logo_path'] = $ven->logo_path;
         array_push($new, $location);
     }
     $data = array('status' => 'ok', 'locations' => $new);
     return $data;
 }
开发者ID:GeorgeBroadley,项目名称:caffeine-vendor,代码行数:12,代码来源:ApiController.php


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