这是什么情况哟!
期待package!
返回对象,return $this;
public function index($category_id =0)
{
$articles = Article::with('getCategory')->where('category_id',$category_id)->paginate(1);
return $this->paginator($articles, new ArticleTransformer(), function ($resource, $fractal) {
$fractal->setSerializer(new ArticleSerializer());
});
}
//加入ThrottlesLogins
use Illuminate\Foundation\Auth\ThrottlesLogins;
//控制器方法类
try {
/*
* 检测用户是否尝试登录次数过多
*/
if ($throttles && $this->hasTooManyLoginAttempts($request)) {
return $this->sendLockoutResponse($request);
}
if (!Auth::attempt(['phone_mobile' => Input::get('username'), 'password' => Input::get('password')], false)) {
throw new \Exception('您输入的帐号或者密码不正确!');
}
if ($throttles) {
$this->clearLoginAttempts($request);
}
} catch (\Exception $e) {
if ($throttles) {
$this->incrementLoginAttempts($request);
}
}
这个也期待, 一直没搞懂单元测试,感觉不是很适用!可能自己理解的不够!
导出CSV格式数据
配置里配置个version或者url
个人不喜欢laravel自带的登录逻辑,全部重写