private function makeTheRestOfThem() { $count = User::count(); for ($i = 2; $i <= $count; $i++) { $profile = Profile::find($i); $profile->nickname = $this->faker->unique()->firstName; $profile->realname = $this->faker->lastName; $profile->dob = $this->faker->date('Y-m-d', '-18 years'); $profile->phone = $this->makeFakeKoreanPhoneNumber(); $profile->gender = $this->faker->randomElement(['male', 'female']); $profile->latitude = $this->faker->latitude; $profile->longitude = $this->faker->longitude; $profile->geo_location = $this->faker->randomElement(['서울특별시 강서구', '경기도 수원시', '부산광역시 해운대구', '경기도 안양시', '경기도 성남시', '서울특별시 강남구', '서울특별시 마포구']); $profile->bio = $this->faker->paragraph(); $profile->photo_url = url('img/avatars/' . $profile->gender . $this->faker->numberBetween(10, 24) . '.jpg'); $profile->photo_count = 1; $profile->save(); } }
/** * Bootstrap the application services. * * @return void */ public function boot() { view()->composer('*', function ($view) { $view->with('currentUser', \Auth::user())->with('totalQuotes', \App\Entities\Quote::count())->with('totalDealers', \App\Entities\User::count())->with('quoteStats', \App\Entities\Quote::getStats()); }); }