| @@ 60-77 (lines=18) @@ | ||
| 57 | * |
|
| 58 | * @return $this|\Illuminate\Http\RedirectResponse |
|
| 59 | */ |
|
| 60 | public function authentication(Request $request) |
|
| 61 | { |
|
| 62 | try { |
|
| 63 | $this->authRepositoryInterface->authenticate($request->all()); |
|
| 64 | } catch (FormValidationException $e) { |
|
| 65 | Flash::error($e->getMessage()); |
|
| 66 | ||
| 67 | return redirect() |
|
| 68 | ->route('auth.login') |
|
| 69 | ->withErrors($e->getErrors()); |
|
| 70 | } catch (AuthenticationException $e) { |
|
| 71 | Flash::error($e->getMessage()); |
|
| 72 | ||
| 73 | return redirect()->route('auth.login'); |
|
| 74 | } |
|
| 75 | ||
| 76 | return redirect()->route('dashboard.index'); |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * Display registration screen. |
|
| @@ 52-68 (lines=17) @@ | ||
| 49 | * |
|
| 50 | * @return $this|\Illuminate\Http\RedirectResponse |
|
| 51 | */ |
|
| 52 | public function store(Request $request) |
|
| 53 | { |
|
| 54 | try { |
|
| 55 | $this->permissionRepositoryInterface->create($request->all()); |
|
| 56 | } catch (FormValidationException $e) { |
|
| 57 | Flash::error($e->getMessage()); |
|
| 58 | ||
| 59 | return redirect() |
|
| 60 | ->route('permissions.create') |
|
| 61 | ->withErrors($e->getErrors()) |
|
| 62 | ->withInput(); |
|
| 63 | } |
|
| 64 | ||
| 65 | Flash::success(trans('dashboard::dashboard.flash.permission.create.success')); |
|
| 66 | ||
| 67 | return redirect()->route('permissions.index'); |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * Show the form for editing the specified resource. |
|
| @@ 52-68 (lines=17) @@ | ||
| 49 | * |
|
| 50 | * @return $this |
|
| 51 | */ |
|
| 52 | public function store(Request $request) |
|
| 53 | { |
|
| 54 | try { |
|
| 55 | $this->roleRepositoryInterface->create($request->all()); |
|
| 56 | } catch (FormValidationException $e) { |
|
| 57 | Flash::error($e->getMessage()); |
|
| 58 | ||
| 59 | return redirect() |
|
| 60 | ->route('roles.create') |
|
| 61 | ->withErrors($e->getErrors()) |
|
| 62 | ->withInput(); |
|
| 63 | } |
|
| 64 | ||
| 65 | Flash::success(trans('dashboard::dashboard.flash.role.create.success')); |
|
| 66 | ||
| 67 | return redirect()->route('roles.index'); |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * Show the form for editing the specified resource. |
|
| @@ 56-72 (lines=17) @@ | ||
| 53 | * |
|
| 54 | * @return $this|\Illuminate\Http\RedirectResponse |
|
| 55 | */ |
|
| 56 | public function store(Request $request) |
|
| 57 | { |
|
| 58 | try { |
|
| 59 | $this->userRepositoryInterface->create($request->all()); |
|
| 60 | } catch (FormValidationException $e) { |
|
| 61 | Flash::error($e->getMessage()); |
|
| 62 | ||
| 63 | return redirect() |
|
| 64 | ->route('users.create') |
|
| 65 | ->withErrors($e->getErrors()) |
|
| 66 | ->withInput(); |
|
| 67 | } |
|
| 68 | ||
| 69 | Flash::success(trans('dashboard::dashboard.flash.user.create.success')); |
|
| 70 | ||
| 71 | return redirect()->route('users.index'); |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * Show the form for editing the specified resource. |
|