Skip to content

Tutorial Laravel 11 Dengan Breeze (PART 2)

Facebook
Twitter
LinkedIn

Kali ini kita akan bahas mekanisme register dari Breeze, Coba perhatikan folder routes pada project, Disana akan ada file baru bernama auth.php dan file ini memang di buat otomatis oleh Breeze untuk mengatur fitur-fitur route yang di butuhkan oleh Breeze itu sendiri. Sekarang mari buka file web.php, Kurang lebih isinya akan seperti ini :

middleware([‘auth’, ‘verified’])->name(‘dashboard’);

Route::middleware(‘auth’)->group(function () {
Route::get(‘/profile’, [ProfileController::class, ‘edit’])->name(‘profile.edit’);
Route::patch(‘/profile’, [ProfileController::class, ‘update’])->name(‘profile.update’);
Route::delete(‘/profile’, [ProfileController::class, ‘destroy’])->name(‘profile.destroy’);
});

Route::resource(‘chirps’, ChirpController::class)
->only([‘index’, ‘store’, ‘edit’, ‘update’, ‘destroy’])
->middleware([‘auth’, ‘verified’]);

require __DIR__.’/auth.php’;

Untuk memulai penelusuran mekanisme register mari ke halaman Welcome.

Leave a Reply

Your email address will not be published. Required fields are marked *