2 years ago

Service Provider IoC, bindings diferrence

Posted 2 years 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.