コード例 #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \DB::table('currencies')->delete();
     $currencies = config('laravel-shop.currencies');
     array_walk($currencies, function ($options, $slug) {
         \Laravel\Shop\Currency::create(['title' => $options['title'], 'slug' => $options['slug'], 'symbol' => $options['symbol'], 'active' => $options['active']]);
     });
 }
コード例 #2
0
ファイル: Product.php プロジェクト: parfumix/laravel-shop
 /**
  * @return array
  */
 public function skyFilter()
 {
     return ['currency_id' => ['label' => 'Currency', 'type' => 'select', 'options' => Currency::all()->lists('slug', 'id')], 'price' => ['type' => 'text'], 'active' => ['type' => 'checkbox']];
 }
コード例 #3
0
ファイル: CartItem.php プロジェクト: parfumix/laravel-shop
 /**
  * @return array
  */
 public function skyFilter()
 {
     return ['currency_id' => ['label' => 'Currency', 'type' => 'select', 'options' => Currency::all()->lists('slug', 'id')], 'quantity' => ['type' => 'text'], 'created_at' => ['type' => 'date'], 'updated_at' => ['type' => 'date']];
 }