Skip to content

Conversation

ghostwriter
Copy link
Contributor

  • confirm all resource methods for an API controller are prefixed with api.

  • if you are mixing "api" and "web" routes in the same controller, then they should all be "web" routes.
    eg.

draft.yaml:

controllers:
  Category:
    resource: index, api.destroy

web.php:

Route::resource('category', 'CategoryController')->only('index', 'destroy');

closes #241
supersedes pr #242

Nathan E and others added 2 commits May 24, 2020 21:55
- confirm all resource methods for an API controller are prefixed with `api.`

- if you are mixing "api" and "web" routes in the same controller, then they should all be "web" routes.
eg.

`draft.yaml`:
```yaml
controllers:
  Category:
    resource: index, api.destroy
```

`web.php`:
```yaml
Route::resource('category', 'CategoryController')->only('index', 'destroy');
```

closes #241
supersedes pr #242
@jasonmccreary jasonmccreary merged commit ba68613 into laravel-shift:master May 25, 2020
@ghostwriter ghostwriter deleted the bugfix/api-resource-controller-lexer branch May 25, 2020 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource: api.store is being added to web.php instead of api.php
2 participants