diff --git a/README.md b/README.md index 663e5e2..bee08da 100644 --- a/README.md +++ b/README.md @@ -75,31 +75,38 @@ When you execute this command, after creating the files, you will see a list of ✅ After, you can see `Laravel Crod` creates crud files such as `Model`, `Controller`, `Form-Requests`, `Migrations` etc. -## CRUD query +## CRUD Query -
+If you run `crud:query` command, the result is: -** You must run the migrate command. **
+- Add `index`, `create`, `store`, `edit`, `update`, `destroy` function to your controller +- Get all migration columns and move it to your model fillable +- Add `index`, `findById`, `delete` functions to your repositories +- Add `store`, `update` functions to your services +- Add resource route (SOON) + +** You must run the migrate command, before `crud:query` command. **
```bash php artisan migrate ``` -Run this command in the terminal.
+For using automatic query, you can run below command: ```bash php artisan crud:query {table_name} {model} {--id-controller} ``` -For example +For example: ```bash php artisan crud:query products Product ``` When write `--id-controller` option add function without route model binding. +When you add `--id-controller` option, the `Laravel Crod` create crud functions without [Route Model Binding](https://laravel.com/docs/routing#route-model-binding) in controller. -After you can see add query to service, repository, controller, model, etc. +After you can see `Laravel Crod` added query to service, repository, controller, model, etc. ## CRUD for module