/** * Run the database seeds. * * @return void */ public function run() { Setting::truncate(); $settings = $this->settings(); foreach ($settings as $setting) { Setting::create($setting); } }
/** * Settings constructor. * * @param Setting $setting * * @todo Needs to be cached forever. On update, it must update the cache too. */ public function __construct(Setting $setting) { $this->items = $setting->all(); }