Product Controller

Quay lại bài học

Product Controller

Lập trình

Tạo CRUD controller cơ bản

Tạo ProductController với: - index: list products - show: single product - new: form tạo - create: xử lý POST - edit: form sửa - update: xử lý PUT - delete: xóa

Code mẫu
<?php

namespace App\Controllers;

use CodeIgniter\Controller;

class Product extends BaseController
{
    // Viết code ở đây
}