teranode / wn-application-core-plugin
Laravel class loader plugin for Winter CMS
Installs: 169
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
Type:winter-plugin
Requires
- composer/installers: ~1.0
This package is auto-updated.
Last update: 2024-12-14 14:31:57 UTC
README
This is an attempt to replace https://github.com/Teranode/winter-laravel-auth-bridge without the need to manually change files in your winter installation. It retains the same classes and aliases used in the application foundation as the auth bridge. The need for the Kernel file has been removed because you can always push your middleware via the boot function.
You can override the default bindings by re-registering the binding in your Plugin.php file
$this->app->singleton('application.core.loader', function ($app) { $bindings = new \Application\Core\Classes\Bindings($app, [ 'redis.connection' => [\Illuminate\Redis\Connections\Connection::class, \Illuminate\Contracts\Redis\Connection::class], ]); $bindings->registerBindings(); });
The first parameter is the application instance, the second parameter is an array of singletons you want to register, and the 3rd parameter is an array of instances you want to register.