Tell me why the resource in the documentation did not understand why it

php artisan make:controller PhotoController --resource 

    1 answer 1

    He makes a controller pattern with CRUD methods that you will write yourself, namely:

    • conclusion
    • getting
    • creature
    • update
    • deletion

    The feature is useful, if you are too lazy to do it yourself, it does not carry anything else in itself.

    • that is, I want to create a controller for working with users, where I will create, delete, block, modify them, and if I write php artisan make: controller UserController --resource, will it create a ready set for work? - Aslero
    • It will create stubs for methods whose logic you will write yourself. This is used only when you know that you will have such methods, and in order not to write them yourself - Laravel will make stubs for you - manowartop
    • thanks for the clarification - Aslero
    • You 're welcome ) - manowartop
    • another question what is the difference between edit and update? - Aslero