Skip to content

RoutingServiceProvider

Properties

loadRoutesUsing

The callback that should be used to load the application's routes.

protected ?\Closure $loadRoutesUsing

alwaysLoadRoutesUsing

The global callback that should be used to load the application's routes.

protected static ?\Closure $alwaysLoadRoutesUsing
  • This property is static.

Methods

register

public register(): void

routes

Register the callback that will be used to load the application's routes.

protected routes(\Closure|callable|string|array|null $routes): $this

Parameters:

Parameter Type Description
$routes \Closure|callable|string|array|null

loadRoutesUsing

Register the callback that will be used to load the application's routes.

public static loadRoutesUsing(\Closure|callable|string|array|null $routes): void
  • This method is static.

Parameters:

Parameter Type Description
$routes \Closure|callable|string|array|null

loadRoutes

Load the application routes.

protected loadRoutes(): void

Throws:


normalizeRoutes

protected static normalizeRoutes(\Closure|callable|string|array $routes): \Closure
  • This method is static.

Parameters:

Parameter Type Description
$routes \Closure|callable|string|array

__call

Pass dynamic methods onto the router instance.

public __call(string $method, array $parameters): mixed

Parameters:

Parameter Type Description
$method string
$parameters array

Inherited methods

__construct

public __construct(\Codefy\Framework\Application $codefy): mixed

Parameters:

Parameter Type Description
$codefy \Codefy\Framework\Application

booting

Register a booting callback to be run before the "boot" method is called.

public booting(\Closure $callback): void

Parameters:

Parameter Type Description
$callback \Closure

booted

Register a booted callback to be run after the "boot" method is called.

public booted(\Closure $callback): void

Parameters:

Parameter Type Description
$callback \Closure

callBootingCallbacks

Call the registered booting callbacks.

public callBootingCallbacks(): void

callBootedCallbacks

Call the registered booted callbacks.

public callBootedCallbacks(): void

defaultProviders

Get the default providers for a CodefyPHP application.

public static defaultProviders(): \Codefy\Framework\Support\DefaultProviders
  • This method is static.

publishes

Register publishable paths for this provider.

public publishes(array<string,string> $paths, string|null $group = null): void

Parameters:

Parameter Type Description
$paths array [from => tag]
$group string|null Optional tag/group name ("config", "migrations", etc.)

pathsToPublish

Get all publishable paths for this provider.

public pathsToPublish(string|null $tag = null): array<string,string>

Parameters:

Parameter Type Description
$tag string|null Restrict to a tag (e.g. "config", "migrations")

Return Value:

[from => tag]


publishTags

List all tags defined by this provider.

public publishTags(): string[]


Automatically generated on 2025-10-13