You're not showing ALL namespaces and uses clauses from your files, where the conflict is.
But I can do a little guess from what you gave us:
If you receive
Call to undefined method Team\Player\Facades\Player::info()
When you do
$player = $this->player->info($player_id);
Is because
function __construct(Match $match, Player $player) { // dependency injection
}
Is telling, somehow, Laravel to instantiate
Team\Player\Facades\Player
Instead of using the already instantiated:
Team\Player\Player
Which is
$this->app['player'];
So, one possibility is having a
uses Team\Player\Facades\Player;
In your MatchController
class. Where you should have
use Player;
or
use Team\Player\Player;
But this will make Laravel to inject a new instance of Team\Player\Player
and not $this->app['player']
, to do that, you would have to
function __construct(Match $match, PlayerInterface $player) {}
And then
App::bind('PlayerInterface', function($app) {
return $app['player'];
});
Well... something like that.
EDIT
You'll have to create that inteface, because PHP will complaint about not finding it.
The best place to put this binding is in its own ´app/bindings.php´ file, but you'll have to load it in your app/start/global.php
:
require app_path().'/filters.php';
require app_path().'/bindings.php';
Your controller should look like this:
uses Team\Player\PlayerInterface;
class MatchController extends BaseController {
...
function __construct(Match $match, PlayerInterface $player)
{
...
}
public function getInfoPlayer()
{
...
}
}
You Player class must implement that interface:
class Player implements PlayerInterface {
...
}