Route
You can generate a route by running the following command.
bash
php artisan better:route blog v1 --apiINFO
Generated route will be at routes/api/v1/blog.php
Arguments
route— name of the generated route fileversionOrDirectory(optional) — version or subdirectory where the route file will be generated
Options
--api— generated route file will be stored inroutes/api. See more at:--force— overwrites an existing file at the same path
Calling a Controller Action
php
Route::group(['prefix' => '/v1/blogs'], function () {
Route::post('/', [BlogController::class, 'store']);
});