Routes

Routes

Bootraiser supports the load method to include the routes that are in the package in laravel. This means that all php files in the package under /laravel-installation/packages/your-package/routes/**.php are used.

<?php
namespace YourCompany\YourPackage\Providers;

use Filefabrik\Bootraiser\Raiser;
use Illuminate\Support\ServiceProvider;

class YourPackageServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Raiser::forProvider($this)->loadRoutes();
    }
}

todo doc:

configuring routes

  • publish
  • load
  • load integrated published routes
  • disable not integrated routes if routes was published

configuring routes with params

References

@laravel https://laravel.com/docs/11.x/packages#routes

@laravelpackage https://www.laravelpackage.com/09-routing/#routes

@paxsy https://paxsy.filefabrik.com/docs/routes/

Last updated on