jasonmccreary / laravel-test-assertions

A set of helpful assertions when testing Laravel applications.
321 stars 34 forks source link

question about resources namr #34

Closed spham closed 2 years ago

spham commented 2 years ago

bellow naming convention, route name should be plurial (https://github.com/alexeymezenin/laravel-best-practices#follow-laravel-naming-conventions) like /posts/1

when use laravel shift

it create in resource view /resource/view/post/

+-----------+---------------------------------+-------------------------------------------------------------------------+
| Method    | URI                             | Action                                                                  |
+-----------+---------------------------------+-------------------------------------------------------------------------+
| GET|HEAD  | /                               | Closure                                                                 |
| GET|HEAD  | api/user                        | Closure                                                                 |
| GET|HEAD  | confirm-password                | App\Http\Controllers\Auth\ConfirmablePasswordController@show            |
| POST      | confirm-password                | App\Http\Controllers\Auth\ConfirmablePasswordController@store           |
| GET|HEAD  | contact                         | App\Http\Controllers\ContactController@index                            |
| POST      | contact                         | App\Http\Controllers\ContactController@store                            |
| GET|HEAD  | contact/create                  | App\Http\Controllers\ContactController@create                           |
| GET|HEAD  | contact/{contact}               | App\Http\Controllers\ContactController@show                             |
| PUT|PATCH | contact/{contact}               | App\Http\Controllers\ContactController@update                           |
| DELETE    | contact/{contact}               | App\Http\Controllers\ContactController@destroy                          |
| GET|HEAD  | contact/{contact}/edit          | App\Http\Controllers\ContactController@edit                             |
| GET|HEAD  | dashboard                       | Closure                                                                 |
| GET|HEAD  | document                        | App\Http\Controllers\DocumentController@index                           |
jasonmccreary commented 2 years ago

You may name them however you like.

spham commented 2 years ago

yes, but when generate each time, name come back