Hey all! Just started using FuelPHP, and so far it looks AMAZING!! I apologize in advance if this question has been asked before, but I simply can not find the solution. Currently I have an ORM model (http://bin.fuelphp.com/snippet/view/a2) and the default test controller (http://bin.fuelphp.com/snippet/view/a1). Basically what I'd like to do is be able to call my model by simply calling Airport::someFunction from the controller. I know I need to use namespaces to achieve this, but I have tried every possible combination and I keep getting "Class Airport not found". Any help would be greatly appreciated!!
Thanks!! One more quick question ... that worked, but I then got an error saying class Log could not be found. I fixed it by prefixing a backslash (\Log). Does this mean the Log class is located in the Model namespace?
No, all Fuel core classes are in the \Fuel\Core namespace, but are aliased to the global namespace, hence the leading backslash.
So all Fuel classes require the leading backslash, unless you're using them in a class that is not namespaced (like app controllers). All non-namespaced classes are in the global namespace, and you don't need to specify a namespace when you call a class in the current namespace.