Exemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  CreateUserRequest $request
  * @return Response
  */
 public function store(CreateUserRequest $request)
 {
     $data = $this->mergeRequestWithPermissions($request);
     $this->user->createWithRoles($data, $request->roles, true);
     flash(trans('user::messages.user created'));
     return redirect()->route('admin.user.user.index');
 }
Exemplo n.º 2
0
 public function run()
 {
     Model::unguard();
     $role = $this->role->findByName('Admin');
     $this->user->createWithRoles(['email' => '*****@*****.**', 'password' => 'demo', 'first_name' => 'John', 'last_name' => 'Doe'], [$role->id], true);
 }
Exemplo n.º 3
0
 /**
  * Store a newly created resource in storage.
  *
  * @param CreateUserRequest $request
  *
  * @return Response
  */
 public function store(CreateUserRequest $request)
 {
     $this->user->createWithRoles($request->all(), $request->roles);
     flash(trans('core::messages.resource.resource created', ['name' => trans('user::users.title.user')]));
     return redirect()->route('backend::user.user.index');
 }
Exemplo n.º 4
0
 /**
  * Store a newly created resource in storage.
  *
  * @param CreateUserRequest $request
  *
  * @return Response
  */
 public function store(CreateUserRequest $request)
 {
     $data = $this->mergeRequestWithPermissions($request);
     $this->user->createWithRoles($data, $request->roles, $request->activated);
     return $this->successCreated();
 }