0
我試圖找到Redirect
類的路徑位置。其門面return 'redirect'
在方法。Laravel類Alias和外觀不匹配實際文件名
<?php namespace Illuminate\Support\Facades;
class Redirect extends Facade {
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor() { return 'redirect'; }
}
但是我發現負責這個類定義的真實文件是'Redirector.php
'。我找不到任何別名'Redirect
'到'Redirector
'的類,所以我想知道Laravel如何知道Redirector
類實際上是容器的組件Redirect
?
非常感謝。 Coul你告訴我你如何找到那個文件有必要的方法?它在Laravel文檔中的某處我失蹤了嗎? – petwho
我只是看了一下我認爲可能相關的文件,瞧,那就是它。重定向是一種特殊情況,它不使用自己的服務提供商,所以我只是瀏覽了代碼並找到了它。 – ciruvan
我很高興你給了我這樣有用的信息。非常感謝。 – petwho