/** * Run the database seeds. * * @return void */ public function run() { DB::table('site_config')->delete(); SiteConfig::create(['allow_reg' => 0]); }
/** * Determine if the user is authorized to make this request * * @return bool */ public function authroize() { return SiteConfig::find(1)->allowReg; }