Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ezra-obiwale committed Oct 23, 2017
2 parents 4144116 + fadca92 commit 8930692
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,18 @@ composer require d-scribe/laraquick

## Dependencies

### v1.*

- PHP >= 7.0
- Laravel - ~5.5
- Guzzle - ~6.0

### v0.*

- PHP >= 5.6.0
- Laravel - 5.4.*
- Laravel Fractal - ^4.0
- Guzzle - ~6.0

## Example

Expand All @@ -36,7 +45,7 @@ class BookController extends Controller {
return Book::class;
}

protected function validationRules($forUpdate = false) {
protected function validationRules(array $data, $id = null) {
return [
'title' => 'required|max:200',
'author' => 'required|max:50',
Expand All @@ -50,6 +59,10 @@ class BookController extends Controller {
And with just the above, the controller would take care of listing (w/ pagination),
and all `CRUD` operations and give the right JSON responses.

```php
Route::apiResource('books', 'BookController');
```

## API Documentation

Coming soon
Coming soon

0 comments on commit 8930692

Please sign in to comment.