Skip to content

generator does not seem to parse partial resource routes using the Route::apiResource method #295

@yipeecaiey

Description

@yipeecaiey

With this in my routes/api.php
Route::apiResource('task', 'TasksController')->except(['store','update']);
I get this error:

In GenerateDocumentation.php line 318: Method store does not exist

But when I change the routes to explicitly call each method (like below) it works:
Route::get('task', 'TasksController@index');
Route::put('task/{$id}', 'TasksController@store');
Route::delete('task/{$id}', 'TasksController@destroy');

And it also works if I use Route::resource and explicitly remote the create and edit methods:
Route::resource('task', 'TasksController')->except(['store','update','create','edit']);

This isn't a big deal to work around...but it would be nice if the generator could handle apiResource partial routes...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions