laravel 5.4里面,admin/login有问题怎么解决啊老师,具体问题就是没有查询admin这张表,而是用了users这张表,而register部分已经成功写入数据到admin表中了
routes/web
Route::get('/admin/login',‘AdminAuth\LoginController@showLoginForm');
Route::post('/admin/login', 'AdminAuth\LoginController@login');
Route::post('/admin/logout', 'AdminAuth\LoginController@logout');
admin/login
<div class="panel-heading">Admin Login</div>
<div class="panel-body">
<form class="form-horizontal" role="form" method="POST" action="{ url('admin/login') }">
AdminAuth/LoginController
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
use AuthenticatesUsers;
protected $redirectTo = '/admin/login';//修改登录后的返回路径
protected $guard = 'admin';
public function showLoginForm()
{
return view('admin.login');
}