Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Installation & Setup
Accessing a model from a controller
this is most likely a simple answer that i have overlooked.. I am trying to create a customer controller that accesses a custom model in FuelPHP as follows: class Controller_Casting extends Controller
public function action_index()
} class Model_casting
public function author_get()
$query = DB::query('SELECT * FROM youtube_author');
$result = $query->execute();
An error is generated by the controller: ErrorException [ Error ]: Class 'Model_casting' not found In code igniter i would have to load the model before using it.. How do you do the same thing in FuelPHP (which i presume is where the issue lies).. The docs though indicate that it should auto load? Thanks,
It appears i was being dumb.. I was prefixing the model file name with "Model"..
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion