dimanche 18 août 2019

Should I create separate provider for service in Laravel?

I have custom service in Laravel:

<?php
namespace App\Library\Services;

class RegisterCustomerService
{
    public function do()
    {
        return 'Output from DemoOne';
    }

}

In which cases I should create provider for this service, when not?

Could I use RegisterCustomerService as composition in specific class like:

$c = new RegisterCustomerService();

Or am i obligated to create Provider?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/31NsTUp
via IFTTT

Aucun commentaire:

Enregistrer un commentaire