Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Docs Model
  • The code in the docs for Models seems to be incorrect. You need to prefix the classes with Model_ don't you?
    class Welcome extends \Model {
    
    class Model_Welcome extends \Model {
    
  • It's recommended, but not required. Could you make an issue about this on Github?
  • This report isn't entirely correct. The docs use:
    namespace Model;
    
    class Welcome extends \Model {
    
        public static function get_results()
        {
            // Database interactions
        }
    
    }
    
    and with the namespace it is absolutely correct. For the autoloader \\Model\Welcome loads from the same file as \Model_Welcome.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion