gpt4 book ai didi

Laravel 5.4,如何找到 LoginController@showLoginForm?

转载 作者:行者123 更新时间:2023-12-05 08:17:23 25 4
gpt4 key购买 nike

在 php artisan route:list 我有

GET|HEAD  | login                  | login            | App\Http\Controllers\Auth\LoginController@showLoginForm                | web,guest

但是当我转到 App\Http\Controllers\Auth\LoginController.php 时,我所拥有的只是以下内容。如何找到“@showLoginForm”部分以便我可以编辑此 Controller ?

<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;

class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/

use AuthenticatesUsers;

/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}

最佳答案

LoginController中,可以看到如下代码:

use AuthenticatesUsers;

上面一行表示这个类/ Controller (LoginController)正在使用AuthenticatesUsers Trait。这个特征的路径是 \vendor\laravel\framework\src\Illuminate\Foundation\Auth\AuthenticatesUsers.php

在这个特征文件中,第一个函数是showLoginForm()

关于Laravel 5.4,如何找到 LoginController@showLoginForm?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44173616/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com