Routes which directly display a view cause a crash at vendor\laravel\framework\src\Illuminate\Routing\ViewController.php:35, as seen in the attached trace back.
laravel.log
To Reproduce
Steps to reproduce the behavior:
Create a new Laravel 8 app.
Install laravel-multilingual-routes.
Create app/locales.php with 'supported' => [ 'en', 'fr' ].
In routes/web.php, add Route::multilingual('home')->view('welcome');
Describe the bug
Routes which directly display a view cause a crash at vendor\laravel\framework\src\Illuminate\Routing\ViewController.php:35, as seen in the attached trace back. laravel.log
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The welcome page should have been displayed.
Result of route:list:
Please post the result of
php artisan route:list
here with the concerned routes.+--------+----------+----------+---------+----------------------------------------------+------------+ | Domain | Method | URI | Name | Action | Middleware | +--------+----------+----------+---------+----------------------------------------------+------------+ | | GET|HEAD | / | | Closure | web | | | GET|HEAD | api/user | | Closure | api | | | | | | | auth:api | | | GET|HEAD | fr/home | fr.home | Illuminate\Routing\ViewController | web | | | GET|HEAD | home | en.home | Illuminate\Routing\ViewController | web | +--------+----------+----------+---------+----------------------------------------------+------------+
Additional context
Add any other context about the problem here.