Last active
January 26, 2018 11:28
-
-
Save zabaala/c6a401afd8d8d21ae803e4f644f2e1d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // ... | |
| class DoctorsController extends Controller | |
| { | |
| public function store(Request $request) | |
| { | |
| try { | |
| $command = new CreateNewDoctorCommand($request->all()); | |
| $command->handle(); | |
| } catch (CommandException $commandException) { | |
| return redirect()->back()->with('errors', $commandException->getError())->withInput(); | |
| } | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment