1. Viết code xử lý trong function create:
2. Viết code xử lý ở function store:
3. Viết code hiển thị form tạo mới category ở views.create
Đây là code để hiển thị toàn bộ các danh sách post, phần trên là phần nhúng code của layouts, trong layouts.master sẽ có thêm code của header và footer.
Dưới đây là demo:
Vậy là chúng ta đã tạo xong category mới rồi đấy <3.