Để sử dụng model trong thư mục common/models trong controller của module backend thì ta đăng kí thêm namespace trong file Module.php
'Taydo_trips\Models' => APP_PATH . '/common/models/',
Gỉa sử trong thư mục common/model có 1 model là user.php thì trong model này phải có dòng
namespace Taydo_trips\Models;
Không có nhận xét nào:
Đăng nhận xét