/**
  * Bootstrap any necessary services.
  *
  * @return void
  */
 public function boot()
 {
     User::observe(new \App\Mircurius\Observers\UserObserver(new EloquentUserRepository()));
     Product::observe(new \App\Mircurius\Observers\ProductObserver());
 }
예제 #2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }