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


PHP Currency::all方法代碼示例

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


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

示例1: globalData

 /**
  * Prepare global variables.
  * @return array
  */
 public static function globalData()
 {
     if (!Auth::check()) {
         $rows = null;
         $cart = null;
         $grandTotal = null;
     } else {
         $rows = Cart::instance(auth()->id())->count(false);
         $cart = Cart::instance(auth()->id())->content();
         $grandTotal = Cart::instance(auth()->id())->total();
     }
     $data = array('menu' => self::getMenuData(self::$parent_id), 'header' => Setting::findOrFail(1), 'rows' => $rows, 'cart' => $cart, 'grand_total' => $grandTotal, 'currencies' => Currency::all());
     return $data;
 }
開發者ID:raylight75,項目名稱:cms,代碼行數:18,代碼來源:GlobalComposer.php

示例2: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('course')->delete();
     Model::unguard();
     $faker = Faker\Factory::create();
     $currencies = Currency::all()->toArray();
     DB::table('course')->insert([['currency_id' => $currencies[0]['id'], 'course_purchase' => 5.4, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[1]['id'], 'course_purchase' => 5.0, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[2]['id'], 'course_purchase' => 1.03, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[3]['id'], 'course_purchase' => 1.7, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[4]['id'], 'course_purchase' => 1.7, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[5]['id'], 'course_purchase' => 1.0, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[6]['id'], 'course_purchase' => 0.1, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[7]['id'], 'course_purchase' => 0.3, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[8]['id'], 'course_purchase' => 0.1, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[9]['id'], 'course_purchase' => 0.00014, 'wallet' => $faker->creditCardNumber], ['currency_id' => $currencies[10]['id'], 'course_purchase' => 0.0, 'wallet' => $faker->creditCardNumber]]);
     Model::reguard();
 }
開發者ID:lyovkin,項目名稱:elcoinbank,代碼行數:14,代碼來源:CourseTableSeeder.php

示例3: index

 public function index()
 {
     return Currency::all();
 }
開發者ID:sasik-github,項目名稱:currency,代碼行數:4,代碼來源:CurrencyController.php

示例4: create

 /**
  * @GET("/purchase/create", as="purchase.create")
  * @param Purchase $purchase
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function create(Purchase $purchase)
 {
     $user = \Auth::user();
     $currencies = Currency::all();
     return view('balance.create', compact('purchase', 'user', 'currencies'));
 }
開發者ID:lyovkin,項目名稱:elcoinbank,代碼行數:11,代碼來源:PurchaseController.php

示例5: index

 /**
  * List all currencies.
  *
  * @return Response
  */
 public function index()
 {
     $currencies = Currency::all();
     return view('admin/currencies/index', ['currencies' => $currencies]);
 }
開發者ID:kudosagency,項目名稱:kudos-php,代碼行數:10,代碼來源:CurrenciesController.php

示例6: getIndex

 public function getIndex()
 {
     return view('admin.currency.index', ['currencies' => Currency::all(), 'active_currency' => Currency::where('active', 1)->first()]);
 }
開發者ID:venomir,項目名稱:tc,代碼行數:4,代碼來源:CurrencyController.php


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