Вход Регистрация
Файл: vendor/laravel/ui/src/AuthRouteMethods.php
Строк: 126
<?php

namespace LaravelUi;

class 
AuthRouteMethods
{
    
/**
     * Register the typical authentication routes for an application.
     *
     * @param  array  $options
     * @return callable
     */
    
public function auth()
    {
        return function (
$options = []) {
            
$namespace = class_exists($this->prependGroupNamespace('AuthLoginController')) ? null : 'AppHttpControllers';

            
$this->group(['namespace' => $namespace], function() use($options) {
                
// Login Routes...
                
if ($options['login'] ?? true) {
                    
$this->get('login', 'AuthLoginController@showLoginForm')->name('login');
                    
$this->post('login', 'AuthLoginController@login');
                }

                
// Logout Routes...
                
if ($options['logout'] ?? true) {
                    
$this->post('logout', 'AuthLoginController@logout')->name('logout');
                }

                
// Registration Routes...
                
if ($options['register'] ?? true) {
                    
$this->get('register', 'AuthRegisterController@showRegistrationForm')->name('register');
                    
$this->post('register', 'AuthRegisterController@register');
                }

                
// Password Reset Routes...
                
if ($options['reset'] ?? true) {
                    
$this->resetPassword();
                }

                
// Password Confirmation Routes...
                
if ($options['confirm'] ??
                    
class_exists($this->prependGroupNamespace('AuthConfirmPasswordController'))) {
                    
$this->confirmPassword();
                }

                
// Email Verification Routes...
                
if ($options['verify'] ?? false) {
                    
$this->emailVerification();
                }
            });
        };
    }

    
/**
     * Register the typical reset password routes for an application.
     *
     * @return callable
     */
    
public function resetPassword()
    {
        return function () {
            
$this->get('password/reset', 'AuthForgotPasswordController@showLinkRequestForm')->name('password.request');
            
$this->post('password/email', 'AuthForgotPasswordController@sendResetLinkEmail')->name('password.email');
            
$this->get('password/reset/{token}', 'AuthResetPasswordController@showResetForm')->name('password.reset');
            
$this->post('password/reset', 'AuthResetPasswordController@reset')->name('password.update');
        };
    }

    
/**
     * Register the typical confirm password routes for an application.
     *
     * @return callable
     */
    
public function confirmPassword()
    {
        return function () {
            
$this->get('password/confirm', 'AuthConfirmPasswordController@showConfirmForm')->name('password.confirm');
            
$this->post('password/confirm', 'AuthConfirmPasswordController@confirm');
        };
    }

    
/**
     * Register the typical email verification routes for an application.
     *
     * @return callable
     */
    
public function emailVerification()
    {
        return function () {
            
$this->get('email/verify', 'AuthVerificationController@show')->name('verification.notice');
            
$this->get('email/verify/{id}/{hash}', 'AuthVerificationController@verify')->name('verification.verify');
            
$this->post('email/resend', 'AuthVerificationController@resend')->name('verification.resend');
        };
    }
}
Онлайн: 0
Реклама