Check for departure airport restrictions #221

This commit is contained in:
Nabeel Shahzad
2018-03-30 11:08:53 -05:00
parent 35fb6f0e52
commit bd30b1f900
12 changed files with 189 additions and 29 deletions

View File

@@ -15,6 +15,18 @@ abstract class Controller extends \Illuminate\Routing\Controller
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
/**
* Write a error to the flash and redirect the user to a route
* @param $message
* @param $route
* @return mixed
*/
public function flashError($message, $route)
{
flash()->error($message);
return redirect(route($route))->withInput();
}
/**
* Shortcut function to get the attributes from a request while running the validations
* @param Request $request