我正在使用Laravel 5.5并尝试为用户和管理员实施多重身份验证.当我尝试在浏览器中调用管理员登录表单时,我收到此错误.
错误:
应用程序\例外宣言\处理器::未经验证($的要求,应用程序\例外\ $的AuthenticationException除外)应符合照亮\基金会\兼容例外\处理器::未认证用户($请求,照亮\身份验证\ $的AuthenticationException除外)
这是我未经身份验证的功能app/Exceptions/Handler:
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
$guard = array_get($exception->guards(), 0);
switch ($guard) {
case 'admin':
$login = 'admin.login';
break;
default:
$login = 'login';
break;
}
return redirect()->guest(route($login));
}
Run Code Online (Sandbox Code Playgroud)
请帮我解决这个问题.
我正在尝试在注册期间获取用户的IP地址和位置...当用户第一次注册时,我想在用户表中保存IP地址和他在数据库中的位置.
请给我一个解决方案,以获取新用户的IP地址和位置...
下面是我正在使用的行但是这给了我错误的localhost的IP地址...
127.0.0.1
$user = new User([
'firstname' => $data['firstname'],
'lastname' => $data['lastname'],
'company' => $data['company'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
'phone' => $data['phone'],
'country' => $data['country'],
'zipcode' => $data['zipcode'],
'city' => $data['city'],
'state' => $data['state'] == "other" ? $data['custom_state'] : $data['state'],
'ip_address' => request()->ip(),
]);
Run Code Online (Sandbox Code Playgroud) 请帮忙 !!!
我正在使用引导卡制作我网站的一部分。我在卡片的圆形图像中遇到问题。我希望我的图像在我将它们放入卡片的图像圆圈中时不会拉伸。有没有办法放大以圆圈显示图像时在图像中间还是我在我的 scss 代码中做错了什么?
这是问题:
这些图像的尺寸:
910x592、1230x802、1230x794
引导代码:
<section class="about-cards-section">
<div class="container">
<div class="row">
<div class="col-sm-4 card-wrapper">
<div class="card card-style" >
<img class="card-img-top rounded-circle circle-image" src="img/about/card-one.png" alt="Card image cap">
<!-- <img src="img/about/card-one.png" class="img-circle" alt="Cinque Terre" width="250" height="236"> -->
<div class="card-body">
<h3 class="card-title">Our Facilities</h3>
<p class="card-text">A short caption detailing an aspect of the brand which is worth mentioning.</p>
</div>
</div>
</div>
<div class="col-sm-4 card-wrapper">
<div class="card card-style">
<img class="card-img-top rounded-circle circle-image" src="img/about/card-two.png" alt="Card image cap">
<div class="card-body">
<h3 class="card-title">Our …Run Code Online (Sandbox Code Playgroud) laravel-5 ×2
php ×2
bootstrap-4 ×1
css ×1
database ×1
ip-address ×1
json ×1
laravel ×1
laravel-5.5 ×1
sass ×1