File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ JsonApiRoute::server('v1')
302
302
$relationships->hasOne('author')->readOnly();
303
303
$relationships->hasMany('tags');
304
304
})->actions('-actions', function ($actions) {
305
- $actions->withId()->post('purge ');
305
+ $actions->withId()->post('publish ');
306
306
});
307
307
308
308
// ...other resources
Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ JsonApiRoute::server('v1')
302
302
$relationships->hasOne('author')->readOnly();
303
303
$relationships->hasMany('tags');
304
304
})->actions('-actions', function ($actions) {
305
- $actions->withId()->post('purge ');
305
+ $actions->withId()->post('publish ');
306
306
});
307
307
308
308
// ...other resources
Original file line number Diff line number Diff line change @@ -490,3 +490,14 @@ JsonApiRoute::server('v1')
490
490
$server->resource('posts', PostController::class);
491
491
});
492
492
```
493
+
494
+ ## Writing Regular Laravel Routes
495
+
496
+ You are not constrained to just using the routing from this package!
497
+
498
+ If you need to create some routes and actions that deviate from JSON: API conventions,
499
+ you can just create an endpoint in exactly the way you would when using Laravel -
500
+ i.e. register a route, write a controller.
501
+
502
+ If you want to return a JSON: API response from the controller, you can use one of the
503
+ package's [ response classes] ( ../responses/ ) .
Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ JsonApiRoute::server('v1')
304
304
$relationships->hasOne('author')->readOnly();
305
305
$relationships->hasMany('tags');
306
306
})->actions('-actions', function (ActionRegistrar $actions) {
307
- $actions->withId()->post('purge ');
307
+ $actions->withId()->post('publish ');
308
308
});
309
309
310
310
// ...other resources
You can’t perform that action at this time.
0 commit comments