Skip to content

MrYamous/livewire-route-attributes

Repository files navigation

Livewire Route Attribute

A Laravel package to declare Livewire routes using PHP attributes.

Inspired by spatie/laravel-route-attributes and Symfony routing, this package brings a declarative route definition approach to Livewire components.

Here's a quick example:

use Yamous\LivewireRouteAttributes\Attributes\Route;

class DefaultController
{
    #[Route(uri: 'index', methods: 'GET', name: 'default.index')]
    public function index()
    {
    }
}

Testing

composer test

Credits

This package is inspired by :

License

The MIT License (MIT). Please see License File for more information.

About

Use PHP 8 attributes to register routes for Livewire components in a Laravel app

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages