2016-03-05 00:18:10 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace app\Http\Middleware;
|
2016-02-29 15:59:36 +00:00
|
|
|
|
|
|
|
|
use Closure;
|
|
|
|
|
|
|
|
|
|
class GeneralChecks
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Handle an incoming request.
|
|
|
|
|
*
|
2016-03-05 00:18:10 +00:00
|
|
|
* @param \Illuminate\Http\Request $request
|
2016-09-06 20:39:27 +00:00
|
|
|
* @param \Closure $next
|
2016-03-05 00:18:10 +00:00
|
|
|
*
|
2016-02-29 15:59:36 +00:00
|
|
|
* @return mixed
|
|
|
|
|
*/
|
|
|
|
|
public function handle($request, Closure $next)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// Show message to IE 8 and before users
|
|
|
|
|
if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/(?i)msie [2-8]/', $_SERVER['HTTP_USER_AGENT'])) {
|
2016-07-28 16:44:59 +00:00
|
|
|
session()->flash('message', 'Please update your browser. This application requires a modern browser.');
|
2016-02-29 15:59:36 +00:00
|
|
|
}
|
2016-09-06 20:39:27 +00:00
|
|
|
|
2016-02-29 15:59:36 +00:00
|
|
|
$response = $next($request);
|
|
|
|
|
|
|
|
|
|
return $response;
|
|
|
|
|
}
|
2016-03-05 00:18:10 +00:00
|
|
|
}
|