Virus Corona (Covid-19)

Dapatkan Informasi terbaru

Contoh Cara menonaktifkan URL Register di Laravel

Adul Azis 23 Jul 2022 8

Di blog ini, saya akan menjelaskan cara menonaktifkan route pendaftaran di laravel. Kami juga dapat mendaftar menghapus Route Otentikasi dari file route.i akan menonaktifkan daftar buat rute khusus di laravel.

Kami akan menggunakan register untuk default Auth::routes() di file web.php saya. Saya akan terbiasa menghapus route register dari file rute. Anda dapat dengan mudah menonaktifkan register.

Di sini contoh berikut menonaktifkan register.

Contoh 1

Sekarang contoh ini di register false untuk menambahkan route auth di buat di file web.php('routes/web.php').

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

 

Contoh: 2

Di sini contoh ini dalam daftar menonaktifkan untuk menambahkan route kustom di buat di file web.php('routes/web.php').

// Authentication Routes...
Route::get('login', 'Auth\[email protected]')->name('login');
Route::post('login', 'Auth\[email protected]');
Route::post('logout', 'Auth\[email protected]')->name('logout');

// Registration Routes...
Route::get('register', 'Auth\[email protected]')->name('register');
Route::post('register', 'Auth\[email protected]');

// Password Reset Routes...
Route::get('password/reset', 'Auth\[email protected]')->name('password.request');
Route::post('password/email', 'Auth\[email protected]')->name('password.email');
Route::get('password/reset/{token}', 'Auth\[email protected]')->name('password.reset');
Route::post('password/reset', 'Auth\[email protected]')->name('password.update');

// Email Verification Routes...
Route::get('email/verify', 'Auth\[email protected]')->name('verification.notice');
Route::get('email/verify/{id}', 'Auth\[email protected]')->name('verification.verify');
Route::get('email/resend', 'Auth\[email protected]')->name('verification.resend');

 

Itu akan membantumu...

 

Tags

laravel disabled route register laravel

Related Stories


Latest Stories


SEARCH

Adul Azis
3 Followers
I'm an AI student who attempts to find simple explanations for questions and share them with others

TOP ARTICLE

OTHER POST