winter-bridge/bridge
Composer 安装命令:
composer require winter-bridge/bridge
包简介
Winter Core Extending Laravel Auth
README 文档
README
This will allow you to use Laravel's core auth with WinterCMS
New Package
Please Consider using this instead to avoid having to manually change your files: https://github.com/Teranode/wn-application-core-plugin
How to install
composer require winter-bridge/bridge
php artisan vendor:publish --tag=winter-bridge-config - this will create an auth.php config file in the congfig/ folder with settings for winter
In bootstrap/app.php change:
$app = new Winter\Storm\Foundation\Application(
realpath(__DIR__.'/../')
);
to
$app = new Winter\Bridge\Foundation\Application(
realpath(__DIR__.'/../')
);
and change:
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
Winter\Storm\Foundation\Http\Kernel::class
);
to
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
Winter\Bridge\Foundation\Http\Kernel::class
);
Next in config/app.php add in the providers after System\SystemProvider:
Illuminate\Auth\AuthServiceProvider::class,
Winter\Bridge\Auth\AuthServiceProvider::class,
now if you want to use said auth you'd do so in the user plugin:
Auth::extend('winter', function($app, $name, array $config)
{
$guard = new \Winter\User\Classes\AuthManager;
return $guard;
});
(you can also add the Gate alias if you want)
After that the package should essentially act as a layer over Laravel's auth while retaining winter's functions.
统计信息
- 总下载量: 1.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-22