dexperts/authentication
Composer 安装命令:
composer create-project dexperts/authentication
包简介
This package will contain all authentication logic and functionality.
README 文档
README
Authentication package created by Dexperts.
About the authentication package
This package contains all the authentication logic and functionality. It can be imported into your laravel project with composer. This has been built up, for example, to reuse and apply login functionality.
Install the authentication package
Note: you must already have a Laravel project to import this package.
Import the package
- create a folder named
packagein the root directory of your Laravel project. - Open the Terminal in the package folder.
- Enter the
composer create-project dexperts/authenticationcommand in the Terminal. - The package is created in your package folder.
Setup the package with a route
- Go to your
routesfolder and open theweb.phpfile. - Import the package above in the file like this:
use Dexperts\Authentication\Auth;
- Create a new
getrequest named/auth. (You can copy the root / request)
Route::get('/auth/{name}', function($sName) { $oAuth = new Auth(); return view('welcome', [ 'name' => $oAuth->call($sName) ]); });
- Go to the
resource/viewsfolder and open thewelcome.blade.phpfile. - Place somewhere the little piece of code in the php file:
<?= $name; ?>
- $name is needed because the variable in the get request has been defined in the view.
- You all set and run your project.
Enjoy :)!
License
The MIT License (MIT)
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-31