From 69cee1f7c27a83c55ac3aa36a3e5ad1ff794f5ad Mon Sep 17 00:00:00 2001 From: Craig Harman Date: Wed, 24 Jul 2019 13:54:56 +0800 Subject: [PATCH] Added route details to readme --- changelog.md | 9 +++++++++ readme.md | 20 +++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index a6f920f..d7e25e8 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,15 @@ All notable changes to `InertiaTable` will be documented in this file. +## Version 1.0.3 + +### Fixed +- Removed hard coded {user} inertia route +- Allow editing of soft deleted models + +### Added +- Added route explanation to readme + ## Version 1.0.2 ### Added diff --git a/readme.md b/readme.md index bd4565d..c185b5b 100644 --- a/readme.md +++ b/readme.md @@ -68,7 +68,25 @@ The index method takes a model and an array of column names which you wish to di You can also stipulate which columns can be searched by adding a third parameter, an array of column names that can be filtered. If left blank all columns are searchable. -3) You will need to create your front end. It is recommend you use [inertia-table-vue](https://github.com/Harmonic/inertia-table-vue) for Vue projects. A JS example is provided at the bottom of [that repository](https://github.com/Harmonic/inertia-table-vue). +3) Add your routes in web.php. You can do these manually or using the custom inertia route included with this package: + +``` php +Route::inertia('users'); +``` + +This will generate all your crud routes: + +| Method | URI | Action | +|----------|--------------------|----------------------------------------------| +| GET | users | App\Http\Controllers\UsersController@index | +| POST | users | App\Http\Controllers\UsersController@store | +| DELETE | users/$uri | App\Http\Controllers\UsersController@destroy | +| PUT | users/$uri | App\Http\Controllers\UsersController@update | +| GET | users/$uri/edit | App\Http\Controllers\UsersController@edit | +| PUT | users/$uri/restore | App\Http\Controllers\UsersController@restore | +| GET | users/create | App\Http\Controllers\UsersController@create | + +4) You will need to create your front end. It is recommend you use [inertia-table-vue](https://github.com/Harmonic/inertia-table-vue) for Vue projects. A JS example is provided at the bottom of [that repository](https://github.com/Harmonic/inertia-table-vue). ## Change log