Để truyền dữ liệu ra View (Passing Data to Views) chúng ta có các cách như sau: 1. Dùng compact() Cú pháp: compact('tencuabientruyenvao') Ví dụ: Route::get('chao/{user}', function ($user) { return view('hello-user', compact('user')); }); // view muon hien thi thi goi...
Xem thêm