@hadayat did you ran php artisan route:list ? This wil show you all routes and then you can determine if there is any closure in that route. Can you submit the output of that command?
Check your routes/api.php there's a default route that laravel adds as an example for you which uses a closure. Please remove or comment that route and test again.
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
@zylwin It worked, but now I am getting another error Unable to prepare route [js/lang.js] for serialization. Uses Closure. I am running thee command "php artisan optimize"
@hadayat@zylwin After a force restart of my laptop my laravel application stopped responded, I tried to make all changes suggested by you guys but still I am getting the same thing.
Unable to prepare route [/] for serialization. Uses Closure. {"exception":"[object] (LogicException(code: 0): Unable to prepare route [/] for serialization. Uses Closure. at /var/www/html/XXXXX/vendor/laravel/framework/src/Illuminate/Routing/Route.php:917)
Please suggest me if your issue is resolved.
Thanks in advance