namespace App\Http\Controllers;
use Auth;
use Illuminate\Http\Request;
class maincontroller extends Controller
{
public function home(Request $request)
{
if(Auth::Attempt($request->only('email','password'))) {
return redirect('/');
}
}
}
- 积分
0 - 话题
0 - 评论
3245 - 注册排名
2248
试试这个,\ Auth :: attempt([...]); 我认为这很有帮助
You may use the
auth
helper instead and then no worries about any class nameChange the
Auth
namespace to: