当我做这个php artisan route:cache对我来说,这个错误出现了。! 我怎么解决这个问题?
LogicException
Unable to prepare route [api/user] for serialization. Uses Closure.
at C:\wamp64\www\web\vendor\laravel\framework\src\Illuminate\Routing\Route.php:1140
1136| */
1137| public function prepareForSerialization()
1138| {
1139| if ($this->action['uses'] instanceof Closure) {
> 1140| throw new LogicException("Unable to prepare route [{$this->uri}] for serialization. Uses Closure.");
1141| }
1142|
1143| $this->compileRoute();
1144|
1 C:\wamp64\www\web\vendor\laravel\framework\src\Illuminate\Foundation\Console\RouteCacheCommand.php:62
Illuminate\Routing\Route::prepareForSerialization()
2 C:\wamp64\www\web\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:33
Illuminate\Foundation\Console\RouteCacheCommand::handle()
森栏