papa

Service Provider IoC, bindings diferrence

Posted 1 year ago by papa

I have in my service Provider the following code in register function

use App\Modules\Core\Includes\Services\Human;

public function register() 
{


$this->app->bind('human', 'App\Modules\Core\Includes\Services\Human');
$this->app->bind('human', function() {
    return new Human();
});
}

What is the difference between this two binding ?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.