/** * 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']]); }); }
/** * @return array */ public function skyFilter() { return ['currency_id' => ['label' => 'Currency', 'type' => 'select', 'options' => Currency::all()->lists('slug', 'id')], 'price' => ['type' => 'text'], 'active' => ['type' => 'checkbox']]; }
/** * @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']]; }