spatie/laravel-route-discovery
소개
Automatically discover routes in a Laravel app
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original// typically in a routes file
Discover::controllers()->in($whateverDirectoryYouPrefer);
Discover::views()->in($whateverDirectoryYouPrefer);
// other routes
Using PHP attributes you can manipulate discovered routes: you can set a route name, add some middleware, or ...
Here's how you would add middleware to a controller whose's route will be auto discovered.
namespace App\Http\Controllers;
use Illuminate\Routing\Middleware\ValidateSignature;
use Spatie\RouteDiscovery\Attributes\Route;
class MyController
{
#[Route(middleware: ValidateSignature::class)]
public function myMethod() { /* ... */ }
}
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Documentation
You'll find full documentation at the Spatie website.
A note on performance
Discovering routes during each application request may have a small impact on performance. For increased performance, we highly recommend caching your routes as part of your deployment process.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
관련 프로젝트 살펴보기
불러오는 중…
