mindtwo / laravel-platform-manager
A pacakage to resolve platforms.
Requires
- php: ^8.0|^8.1|^8.2
- laravel/framework: ^9.0|^10.0|^11.0
- mindtwo/laravel-auto-create-uuid: ^2.6
- mindtwo/native-enum: ^1.7
Requires (Dev)
- guzzlehttp/guzzle: ^7.8
- guzzlehttp/promises: ^2.0
- larastan/larastan: ^2.9
- laravel/nova: ^4.26
- laravel/pint: ^1.4
- orchestra/testbench: ^7.0|^8.0|^9.0
- pestphp/pest: ^1.0|^2.0
- pestphp/pest-plugin-laravel: ^1.0|^2.0
- pestphp/pest-plugin-watch: ^1.0|^2.0
- dev-master
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6
- 2.5
- 2.4
- 2.3
- 2.2
- 2.1.14.x-dev
- 2.1.14
- 2.1.13.x-dev
- 2.1.13
- 2.1.12
- 2.1.11.x-dev
- 2.1.11
- 2.1.10
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1
- 2.0.1
- 2.0
- 1.12.1
- 1.12
- 1.11
- 1.10
- 1.9.13
- 1.9.12
- 1.9.11
- 1.9.10
- 1.9.6
- 1.9.5
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9
- 1.8.1
- 1.8
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.2
- 1.6.1
- 1.6
- 1.5
- 1.4
- 1.3
- 1.2
- 1.1
- 1.0
- 0.1
- dev-origin/2.3
- dev-feat/webhooks-v2
- dev-feature/update-to-laravel-10
This package is auto-updated.
Last update: 2024-12-13 10:25:33 UTC
README
Installation
You can install the package via composer:
composer require mindtwo/laravel-platform-manager
How to use?
Publish config
To publish the modules config file simply run
php artisan vendor:publish --provider="mindtwo\LaravelPlatformManager\Providers\LaravelPlatformManagerProvider" --tag=config
This publishes the platform-resolver.php
config file to your projects config folder.
Inside the config you can specify your Platform model which will be used by the package.
Publish migrations
To publish the modules migrations file simply run
php artisan vendor:publish --provider="mindtwo\LaravelPlatformManager\Providers\LaravelPlatformManagerProvider" --tag=migrations```
After publishing run
php artisan migrate
With Laravel Sanctum
To use the platforms with Laravel's Sanctum package you should add the middleware
mindtwo\LaravelPlatformManager\Middleware\StatefulPlatformDomais
to your project's
Kernel.php
. To be concrete to the middlewareGroup api
or your equivalent.
This middleware adds the plaform's hostnames to Sanctums Stateful Domains.
Retrieve a platform
To receive the current platform you are working in simply inject mindtwo\LaravelPlatformManager\Services\PlatformResolver
to your service, controller, middleware, etc. Via the method getCurrentPlatform()
you can receive your platform model.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email info@mindtwo.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.