mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
update to laravel 9
This commit is contained in:
@@ -17,11 +17,12 @@ class Platform
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (empty(nexus()->getPlatform())) {
|
||||
$platform = nexus()->getPlatform();
|
||||
if (empty($platform)) {
|
||||
throw new \InvalidArgumentException("Require platform header.");
|
||||
}
|
||||
if (!nexus()->isPlatformValid()) {
|
||||
throw new \InvalidArgumentException("Invalid platform: " . CURRENT_PLATFORM);
|
||||
throw new \InvalidArgumentException("Invalid platform: " . $platform);
|
||||
}
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user