public static function type($type, $rootOnly = true) { $refs = Ref::whereType($type); if ($rootOnly) { $refs->wherePid(0); } return $refs->get(); }
/** * Run the database seeds. * * @return void */ public function run() { DB::table('withdrawals')->truncate(); DB::table('payments')->truncate(); DB::table('banners')->truncate(); DB::table('banner_stream')->truncate(); $this->faker = FakerFactory::create(); $data = []; $data['languages'] = Ref::whereType('language')->get(); $data['games'] = Ref::whereType('game')->get(); $data['bannerTypes'] = Ref::whereType('banner_type')->get(); $this->data = $data; $this->addBanners(); }
/** * Run the database seeds. * * @return void */ public function run() { DB::table('streams')->truncate(); DB::table('stream_timelogs')->truncate(); DB::table('banner_stream')->truncate(); DB::table('user_transfers')->truncate(); DB::table('referrals')->truncate(); $this->faker = FakerFactory::create(); $data = []; $data['languages'] = Ref::whereType('language')->get(); $data['games'] = Ref::whereType('game')->get(); $data['bannerTypes'] = Ref::whereType('banner_type')->get(); $this->data = $data; for ($i = 0; $i <= 10; $i++) { $this->addStreams(); } $this->payStreams(); }
/** * Run the database seeds. * * @return void */ public function run() { DB::table('users')->truncate(); DB::table('user_profiles')->truncate(); DB::table('user_auth_token')->truncate(); DB::table('user_transfers')->truncate(); DB::table('ref_user')->truncate(); DB::table('notifications')->truncate(); DB::table('logs')->truncate(); DB::table('referrals')->truncate(); DB::table('coupon_user')->truncate(); $this->faker = FakerFactory::create(); $data = []; $data['languages'] = Ref::whereType('language')->get(); $data['games'] = Ref::whereType('game')->get(); $data['bannerTypes'] = Ref::whereType('banner_type')->get(); $this->data = $data; $this->admin(); $this->streamers(100); $this->clients(100); }