Route

Command

You can generate a route by following command.

php artisan mojura:route [RouteFileName] [VersionDirectory] [—-web] [--force]

php artisan mojura:route core v1

Generated route file will be at routes/api/v1/core.php


Parameters

  • [RouteFileName]: The name of the route you want to create (required).

  • [VersionDirectory]: The version of the route or directory where the route will be created (required).

  • [--web]: For web routes, generated route file will be store in web directory (optional).

  • [--force]: If set, it will overwrite any existing request class with the same name (optional).


Calling A Controller Method

Route::group(['prefix' => '/v1/core'], function() {
    Route::post('/auth/login', [AuthController::class, 'login']);
});
Updated on