久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Laravel 5.4 禁用注冊(cè)路由

Laravel 5.4 Disable Register Route(Laravel 5.4 禁用注冊(cè)路由)
本文介紹了Laravel 5.4 禁用注冊(cè)路由的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我正在嘗試禁用在 Laravel 5.4 中運(yùn)行的應(yīng)用程序上的注冊(cè)路由.

I am trying to disable the register route on my application which is running in Laravel 5.4.

在我的路由文件中,我只有

In my routes file, I have only the

Auth::routes();

有什么辦法可以禁用注冊(cè)路由嗎?

Is there any way to disable the register routes?

推薦答案

code:

Auth::routes();

這是這組路線的捷徑:

// Authentication Routes...
Route::get('login', 'AuthLoginController@showLoginForm')->name('login');
Route::post('login', 'AuthLoginController@login');
Route::post('logout', 'AuthLoginController@logout')->name('logout');

// Registration Routes...
Route::get('register', 'AuthRegisterController@showRegistrationForm')->name('register');
Route::post('register', 'AuthRegisterController@register');

// Password Reset Routes...
Route::get('password/reset', 'AuthForgotPasswordController@showLinkRequestForm')->name('password.request');
Route::post('password/email', 'AuthForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'AuthResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'AuthResetPasswordController@reset');

因此,您可以用路由列表替換第一個(gè),并注釋掉您的應(yīng)用程序中不需要的任何路由.

So you can substitute the first with the list of routes and comment out any route you don't want in your application.

編輯 laravel 版本 =>5.7

在較新的版本中,您可以向 Auth::routes() 函數(shù)調(diào)用添加一個(gè)參數(shù)以禁用注冊(cè)路由:

In newer versions you can add a parameter to the Auth::routes() function call to disable the register routes:

Auth::routes(['register' => false]);

添加了電子郵件驗(yàn)證路徑:

The email verification routes were added:

Route::get('email/verify', 'AuthVerificationController@show')->name('verification.notice');
Route::get('email/verify/{id}', 'AuthVerificationController@verify')->name('verification.verify');
Route::get('email/resend', 'AuthVerificationController@resend')->name('verification.resend');

順便說(shuō)一句,您還可以禁用 Password ResetEmail Verification 路由:

BTW you can also disable Password Reset and Email Verification routes:

Auth::routes(['reset' => false, 'verify' => false]);

這篇關(guān)于Laravel 5.4 禁用注冊(cè)路由的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

add new element in laravel collection object(在 Laravel 集合對(duì)象中添加新元素)
Creating an edit modal in Laravel 5(在 Laravel 5 中創(chuàng)建編輯模式)
Laravel 5.5 API resources for collections (standalone data)(用于集合的 Laravel 5.5 API 資源(獨(dú)立數(shù)據(jù)))
What is the best practice to create a custom helper function in php Laravel 5?(在 php Laravel 5 中創(chuàng)建自定義輔助函數(shù)的最佳實(shí)踐是什么?)
No #39;Access-Control-Allow-Origin#39; header - Laravel(沒(méi)有“Access-Control-Allow-Origin標(biāo)頭 - Laravel)
Laravel Passport Route redirects to login page(Laravel Passport Route 重定向到登錄頁(yè)面)
主站蜘蛛池模板: 国产精品久久久久久久久污网站 | 一区二区三区视频在线观看 | 91精品国产综合久久福利软件 | 日韩欧美视频免费在线观看 | 国产精品一区久久久 | 欧美日韩免费一区二区三区 | 亚洲精品区 | 成人二区 | 国产成人精品久久 | 久久精品亚洲精品国产欧美 | 国产欧美一区二区三区在线看蜜臀 | 91视在线国内在线播放酒店 | 在线视频久久 | 国产欧美精品区一区二区三区 | 欧洲国产精品视频 | 国产亚洲高清视频 | 国产麻豆一区二区三区 | 日韩中文av在线 | 91xx在线观看 | 91av在线电影 | 欧美精品在线观看 | 91精品久久久久久久久 | 久久久久免费精品国产小说色大师 | 亚洲国产一区二区三区在线观看 | 日本中文在线 | 日日夜夜精品免费视频 | 日韩av高清 | 天堂av在线影院 | 日本在线网站 | 日韩在线不卡 | 91动漫在线观看 | 国产一区二区日韩 | 亚洲综合在线网 | 国产亚洲欧美另类一区二区三区 | 日韩aⅴ在线观看 | 日韩一区二区三区在线播放 | www国产亚洲精品久久网站 | 黄色a视频| 91精品国产综合久久福利软件 | 久草资源| 欧美极品在线 |