Download the PHP package danpalmieri/jetstream-team-url without Composer
On this page you can find all versions of the php package danpalmieri/jetstream-team-url. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download danpalmieri/jetstream-team-url
More information about danpalmieri/jetstream-team-url
Files in danpalmieri/jetstream-team-url
Package jetstream-team-url
Short Description A package to show the current team as a prefix in the url. You must install Laravel Jetstream with the Team feature enabled.
License MIT
Homepage https://github.com/danpalmieri/jetstream-team-url
Informations about the package jetstream-team-url
Laravel Jetstream Team URL
A package to show the user's current team in the url. Good to generate permalinks and to auto switch when is convenient. You must install Laravel Jetstream with the Team feature enabled.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
Just add the method useTeamInUrl() method to your routes group.
You also get the currentTeamRedirect() method. Put this outside of the Route::useTeamInUrl() method.
Behaviour
Somethings to note about the package:
- The package will automatically add the team id (or other attribute) to the url if the user is logged and on a team (and you are using named routes).
- It will also check if the user is on the correct team. If not, it will redirect or abort.
- The currentTeamRedirect($char) method will replace the occurence of the character with the current team id (or other attribute) in the url.
Testing
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
- Dan Palmieri
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of jetstream-team-url with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0