I'm trying to use psr-4 autoload for the first time with Laravel. After I do that with models and I have the following eloquent model:
<?php namespace Models\Series;
class Player extends \BaseModel {}
It works fine, but if I add a collection like this:
public static function listing()
{
return Player::paginate(15);
}
Then I receive this error:
Cannot redeclare class Models\Series\Player
I also tried replacing Player::paginate(15)
with self::paginate(15)
, but for no avail.