/**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(CreateUserRequest $request)
 {
     $user = User::create($request->all());
     $message = $user->name . trans('messages.new');
     Session::flash('new', $message);
     return redirect()->route('dashboard.users.index');
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }