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


PHP Location::get方法代碼示例

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


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

示例1: billing

 public function billing()
 {
     $cart = Cart::content();
     $count = Cart::count();
     $locations = Location::get();
     // get shipping
     if ($count == 1) {
         $data['shipping'] = 5;
     } else {
         $data['shipping'] = 2 * ($count - 1) + 5;
     }
     if ($count < 1) {
         return redirect('cart/view')->with('message', 'cart is empty');
     } else {
         return view('cart.billing', compact('cart', 'locations'), $data);
     }
 }
開發者ID:rereyossi,項目名稱:hairstuation,代碼行數:17,代碼來源:CartController.php

示例2: edit

 public function edit($booking_id)
 {
     $booking = Booking::with('comment.comment_type', 'comment.role.user', 'comment.role.role_type', 'change.change_type', 'change.user', 'car_type', 'role.user', 'role.role_type', 'income.income_type', 'outcome.outcome_type', 'route_point.location', 'route_point.sub_location', 'route_point.address')->with(array('route_point' => function ($query) {
         $query->orderBy('order', 'ASC');
     }))->findOrFail($booking_id);
     $car_types = Car_type::get();
     $role_types = Role_type::get();
     $income_types = Income_type::get();
     $outcome_types = Outcome_type::get();
     $locations = Location::get();
     $sub_locations = Sub_location::get();
     $addresses = Address::get();
     JavaScript::put(['addresses' => $addresses, 'booking' => $booking, 'car_types' => $car_types, 'income_types' => $income_types, 'locations' => $locations, 'outcome_types' => $outcome_types, 'role_types' => $role_types, 'sub_locations' => $sub_locations, 'csrf_token' => csrf_token()]);
     return view('booking.edit');
 }
開發者ID:jedlicka82,項目名稱:transferpraha,代碼行數:15,代碼來源:BookingController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return Response::json(Location::get());
 }
開發者ID:subhadip-sahoo,項目名稱:laravel,代碼行數:9,代碼來源:LocationController.php

示例4: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker::create();
     $locations = Location::get()->lists('id')->all();
     foreach (range(1, 10) as $index) {
         DB::table('stories')->insert(['title' => $faker->city, 'story' => $faker->text, 'published' => rand(0, 1), 'location_id' => $faker->randomElement($locations)]);
     }
 }
開發者ID:paruljoshi,項目名稱:Programming-Assignments,代碼行數:13,代碼來源:DatabaseSeeder.php


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