@PHPjedi

Откуда берется класс Auth в роутах?

После команды php artisan make:Auth в роутах появилась следующая строка : Auth::routes();

Где находится класс Auth ?
  • Вопрос задан
  • 388 просмотров
Решения вопроса 1
@Result007
P|-|P
В Laravel 5.5 этот метод вызывается из этого класса:
vendor\laravel\framework\src\Illuminate\Support\Facades\Auth

А оттуда уже вызывается метод auth() класса:
vendor\laravel\framework\src\Illuminate\Routing\Router
public function auth()
    {
        // Authentication Routes...
        $this->get('login', 'Auth\LoginController@showLoginForm')->name('login');
        $this->post('login', 'Auth\LoginController@login');
        $this->post('logout', 'Auth\LoginController@logout')->name('logout');

        // Registration Routes...
        $this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
        $this->post('register', 'Auth\RegisterController@register');

        // Password Reset Routes...
        $this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
        $this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
        $this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
        $this->post('password/reset', 'Auth\ResetPasswordController@reset');
    }
Ответ написан
Пригласить эксперта
Ответы на вопрос 2
Комментировать
Sanasol
@Sanasol Куратор тега Laravel
нельзя просто так взять и загуглить ошибку
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы