Skip to content

Instantly share code, notes, and snippets.

@Mourishitz
Created February 29, 2024 19:04
Show Gist options
  • Save Mourishitz/87ad70e8d1e02eb8da818dbdc47b1944 to your computer and use it in GitHub Desktop.
Save Mourishitz/87ad70e8d1e02eb8da818dbdc47b1944 to your computer and use it in GitHub Desktop.
Stub file to be used as template on LaravelCore project
<?php
namespace App\Api\Modules\{{ ModuleName }}\Routers;
use App\Api\Modules\{{ ModuleName }}\Controllers\{{ ModuleName }}Controller;
use App\Core\Interfaces\RouterInterface;
use Illuminate\Routing\Router;
class {{ ModuleName }}Router implements RouterInterface
{
private const CONTROLLER = {{ ModuleName }}Controller::class;
public static function routes(Router $router): void
{
$router->group(['prefix' => '{{ RouterPrefix }}'], function (Router $api) {
$api->post('/', [self::CONTROLLER, 'all']);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment