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