Sử dụng bcrypt đăng ký pass, sử dụng get, post cho cùng 1 route, validate form (ok)
https://www.itsolutionstuff.com/post/laravel-9-form-validation-tutorial-exampleexample.html
C:\xampp\htdocs\test\routes\web.php
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\FormController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
Route::get('user/create', [ FormController::class, 'create' ]);
Route::post('user/create', [ FormController::class, 'store' ]);C:\xampp\htdocs\test\app\Http\Controllers\FormController.php
C:\xampp\htdocs\test\resources\views\createUser.blade.php
Previous[COMMON] sử dụng Session::get('success'), Session::get('images') một cách thành thạo (ok)NextBạn đã hiểu rõ lệnh php artisan make:model Post -mcr chưa? (ok)
Last updated
Was this helpful?