Reputation: 199
I'm tring to create a basecontroller which includes auth-check and extend it in other controllers.However,it displays not found error.
This is the basecontoller in fuel/app/classes/controller. Filename is admin.php.
class Controller_Admin extends Controller
{
public function before(){
}
}
This is a sample controller in fuel/app/classes/controller.
class Controller_Sample extends Admin
{
}
This codes cause this error.
ErrorException [ Fatal Error ]:
Class 'Admin' not found
How should I solve this?
Upvotes: 0
Views: 167
Reputation: 2512
Instead of Admin
use Controller_Admin
class Controller_Sample extends Controller_Admin
{
}
Upvotes: 1