Skip to content

Commit 12638a1

Browse files
author
Shashank Jain
committed
Chore: add laravel version to README.md
1 parent d488ef9 commit 12638a1

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ This package provides a powerful Rest API functionality for your Laravel project
33

44
**Note**: This package is under development and not recommended for use in production.
55

6+
## Requirements
7+
This package has been tested with Laravel v5.2. So, it should work with lower 5.x versions. It will work with v5.3 too.
8+
69
## Setup
710
1) Add this package to your composer.json
811
```
@@ -52,9 +55,15 @@ class UserController extends ApiController
5255
regular `Route` class for all other routes.
5356

5457
```
55-
ApiRoute::group(['middleware' => ['web', 'auth'], 'prefix' => 'api', 'namespace' => 'App\Http\Controllers'], function () {
56-
ApiRoute::resource('user', 'UserController');
57-
});
58+
ApiRoute::group(
59+
[
60+
'middleware' => ['web', 'auth'],
61+
'prefix' => 'api',
62+
'namespace' => 'App\Http\Controllers'],
63+
function () {
64+
ApiRoute::resource('user', 'UserController');
65+
}
66+
);
5867
```
5968

6069
Thats it! Your api endpoint `/api/user` will now work. All the REST methods - `index`, `store`, `show`, `put`, `delete` - work out of the box.

0 commit comments

Comments
 (0)