tareq1988 / wp-eloquent

Eloquent ORM for WordPress
https://tareq.co/2015/05/eloquent-orm-in-wordpress/
566 stars 135 forks source link

Class not loaded. #48

Open xfreakart opened 6 years ago

xfreakart commented 6 years ago

It might be a stupid thing but I don't get it.

on plugin main file:

require_once(__DIR__ . '/vendor/autoload.php');

Class file ( Models/TestUser.php ):

namespace App;
class TestUser extends \WeDevs\ORM\Eloquent\Model
[...]

Somewhere else:

use App\TestUser as TestUser;
[...]
 var_dump(TestUser::testFunc());

Error:

Uncaught Error: Class 'App\TestUser' not found in ....

I'm using phpStorm and it gets the namespace. PD: I've ran composer dump-autoload.

any clue?¿