Class not found

Have found serveral oher topics concerning the same issue, but I am not able to solve my issue. Apparently something in 5.7.5 has changed that broke my package.

I have got the following two files:

In the controller:
namespace Concrete\Package\Packagename\Controller\SinglePage\SubDir;

use \Concrete\Package\Packagename\Models\Modelname as Mymodel;

class Pagename extends \Concrete\Core\Page\Controller\PageController {
public function my_function(){
$output = Mymodel::function();

In the model:
namespace Concrete\Package\Packagename\Models;

defined('C5_EXECUTE') or die("Access Denied.");

use \Concrete\Core\Legacy\Model;
use Loader;

class Modelname extends Model{

But when running i get a class not found error:
Class 'Concrete\Package\Packagename\Models\Modelname' not found

What should I change to get this working?

View Replies:
hutman replied on at Permalink Reply
You need t move your models into a src folder in the root of your package and then update the filenames to be Camelcased and update the namespaces throughout the package to have them in that place. They stopped auto loading the models in 5.7.5
rklomp replied on at Permalink Reply
Thanks moving my files to a Src folder fixed it!