-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Description
- Laravel Version: 5.4.36
- PHP Version: 5.6.32 (Homestead)
Description:
The project works under PHP5.6. After updating the dependencies, an error occurred:

Steps To Reproduce:
The error occurs if I access the apiResource method in api.php:
app('router')
->apiResource('orders', 'Api\OrdersController', [
'only' => ['show', 'store'],
]);If you remove the use of this method, the error disappears.
Next, in the file composer.lock found the following dependencies:
"name": "doctrine/annotations",
"version": "v1.6.0",
"php": "^7.1"
"name": "doctrine/collections",
"version": "v1.5.0",
"php": "^7.1"
"name": "doctrine/inflector",
"version": "v1.3.0",
"php": "^7.1"
"name": "doctrine/instantiator",
"version": "1.1.0",
"php": "^7.1"
"name": "symfony/css-selector",
"version": "v4.0.3",
"php": "^7.1.3"
"name": "symfony/event-dispatcher",
"version": "v4.0.3",
"php": "^7.1.3"
"name": "symfony/yaml",
"version": "v4.0.3",
"php": "^7.1.3"
"name": "phpdocumentor/reflection-docblock",
"version": "4.2.0",
"php": "^7.0",
"name": "phpunit/php-token-stream",
"version": "2.0.2",
"php": "^7.0"
If I use routes:
app('router')
->get('orders/{orders}', 'Api\OrdersController@show')
->name('orders::show');
app('router')->post('orders', 'Api\OrdersController@store')
->name('orders::store');then problem not found.
Metadata
Metadata
Assignees
Labels
No labels