Is there any way to define the name of the route group in laravel 8?
I'm trying to build routes for the sellers to go to the order management site, and below is my routes list in web.php
use App\Http\Controllers\Seller\OrderController;
Route::group(['prefix' => 'seller', 'middleware' => 'auth', 'as' => 'seller.', 'namespace' => 'Seller'], function () {
Route::redirect('/','seller/orders');
Route::resource('/orders', [OrderController::class]);
});
Errors
ErrorException
Array to string conversion
at C:\wamp64\www\my-project\vendor\laravel\framework\src\Illuminate\Routing\ResourceRegistrar.php:416
412▕ protected function getResourceAction($resource, $controller, $method, $options)
413▕ {
414▕ $name = $this->getResourceRouteName($resource, $method, $options);
415▕
➜ 416▕ $action = ['as' => $name, 'uses' => $controller.'@'.$method];
417▕
418▕ if (isset($options['middleware'])) {
419▕ $action['middleware'] = $options['middleware'];
420▕ }
1 C:\wamp64\www\my-project\vendor\laravel\framework\src\Illuminate\Routing\ResourceRegistrar.php:416
Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Array to string conversion", "C:\wamp64\www\my-project\vendor\laravel\framework\src\Illuminate\Routing\ResourceRegistrar.php", ["orders", "index", "orders.index"])
2 C:\wamp64\www\my-project\vendor\laravel\framework\src\Illuminate\Routing\ResourceRegistrar.php:189
Illuminate\Routing\ResourceRegistrar::getResourceAction("orders", "index", [])