What's Changed
- add case for Macos in ResponseTest::testResponseBodyCallbackGzip by @lubiana in #605
- add unit-test workflow by @lubiana in #606
- reenable controller command test by @lubiana in #607
- Group compact syntax by @fadrian06 in #596
You can now easily add a new resource route to help standardize your API routes. For examples, defining a resource with Flight::resource('/posts', PostsController::class);
will allow the following routes by default:
$defaultMapping = [
'index' => 'GET ',
'create' => 'GET /create',
'store' => 'POST ',
'show' => 'GET /@id',
'edit' => 'GET /@id/edit',
'update' => 'PUT /@id',
'destroy' => 'DELETE /@id'
];
And the ensuing controller file will look like this:
class PostsController
{
public function index(): void
{
}
public function show(string $id): void
{
}
public function create(): void
{
}
public function store(): void
{
}
public function edit(string $id): void
{
}
public function update(string $id): void
{
}
public function destroy(string $id): void
{
}
}
Full Changelog: v3.12.0...v3.13.0