File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 15
15
16
16
Route::get ('/unsupported-browser ' , 'AngularController@unsupported ' );
17
17
18
-
19
18
$ api = app ('Dingo\Api\Routing\Router ' );
20
19
21
- $ api ->version ('v1 ' , function ($ api ){
20
+ $ api ->version ('v1 ' , function ($ api ) {
22
21
/*
23
22
* used for Json Web Token Authentication - https://scotch.io/tutorials/token-based-authentication-for-angularjs-and-laravel-apps
24
23
* Make sure to re-enable CSRF middleware if you're disabling JWT
25
24
*/
26
25
$ api ->controller ('authenticate ' , 'App\Http\Controllers\AuthenticateController ' );
27
26
28
-
29
27
$ api ->get ('test ' , 'App\Http\Controllers\WelcomeController@getSample ' );
30
28
});
31
29
32
-
33
30
//protected with JWT
34
- $ api ->version ('v1 ' , ['middleware ' => 'api.auth ' ], function ($ api ){
31
+ $ api ->version ('v1 ' , ['middleware ' => 'api.auth ' ], function ($ api ) {
35
32
36
33
$ api ->post ('test/sample ' , 'App\Http\Controllers\WelcomeController@sample ' );
37
34
Original file line number Diff line number Diff line change 155
155
*/
156
156
157
157
'auth ' => [
158
- 'jwt ' => 'Dingo\Api\Auth\Provider\JWT '
158
+ 'jwt ' => 'Dingo\Api\Auth\Provider\JWT ' ,
159
159
],
160
160
161
161
/*
You can’t perform that action at this time.
0 commit comments