用户认证
2016-04-25 20:48
281 查看
创建所需要的路由和视图
命令行执行
会创建出以下的相关文件
创建相关数据结构
产生了 users , password_resets 两张表
在 app\Http\routes.php文件下,自动添加了
对应的代码逻辑如下:
命令行执行
php artisan make:auth
会创建出以下的相关文件
Created View: D:\wwwroot\hongjh.info\resources/views/auth/login.blade.php Created View: D:\wwwroot\hongjh.info\resources/views/auth/register.blade.php Created View: D:\wwwroot\hongjh.info\resources/views/auth/passwords/email.blade.php Created View: D:\wwwroot\hongjh.info\resources/views/auth/passwords/reset.blade.php Created View: D:\wwwroot\hongjh.info\resources/views/auth/emails/password.blade.php Created View: D:\wwwroot\hongjh.info\resources/views/layouts/app.blade.php Created View: D:\wwwroot\hongjh.info\resources/views/home.blade.php Created View: D:\wwwroot\hongjh.info\resources/view/welcome.blade.php
创建相关数据结构
$ php artisan migrate Migration table created successfully. Migrated: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_100000_create_password_resets_table
产生了 users , password_resets 两张表
在 app\Http\routes.php文件下,自动添加了
Route::auth();
对应的代码逻辑如下:
namespace Illuminate\Routing; public function auth() { // Authentication Routes... $this->get('login', 'Auth\AuthController@showLoginForm'); $this->post('login', 'Auth\AuthController@login'); $this->get('logout', 'Auth\AuthController@logout'); // Registration Routes... $this->get('register', 'Auth\AuthController@showRegistrationForm'); $this->post('register', 'Auth\AuthController@register'); // Password Reset Routes... $this->get('password/reset/{token?}', 'Auth\PasswordController@showResetForm'); $this->post('password/email', 'Auth\PasswordController@sendResetLinkEmail'); $this->post('password/reset', 'Auth\PasswordController@reset'); }
相关文章推荐
- poj 1661 Help Jimmy(DP)
- beamer使用之ppt中插入四张图像,及中文
- Jenkins插件开发(2):开发新插件
- jQuery comet
- SOA,Webservice,SOAP,REST,RPC,RMI,JMS的区别与联系
- 第十三章 搜索
- BZOJ-2038-[2009国家集训队]小Z的袜子(hose)(莫队)
- Java——static
- 前端面试题系列
- emacs常用快捷键总结 ———制成桌面背景
- MySQL查询一小时之内的数据
- Linux下网卡eth1如何修改为eth0
- Spark入门实战系列 spark编程模型--IDEA搭建及实战
- hdu Summer Holiday(tarjan)
- HDU 2476 String painter 区间dp
- 推荐——基于python
- Android 真机投影工具 Vysor 使用教程
- 数字方阵
- POJ 3468 A Simple Problem with Integers (树状数组)
- uvA Flooded!