Filippo Bertilotti
2024-07-15 488dbe0a4f0d5be738a5ac010d19a94ce45f20a2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
 
namespace App\Providers;
 
use App\Models\SendMail;
use App\Vola\Repositories\SendMail\SendMailRepository;
use App\Models\Click2CartCatalog;
use App\Vola\Repositories\Click2CartCatalog\Click2CartCatalogRepository;
 
use Illuminate\Support\ServiceProvider;
 
class RepositoryServiceProvider extends ServiceProvider
{
    public function register()
    {
        // Registrazione SendMailInterface
        $this->app->bind('Vola\Repositories\SendMail\SendMailRepositoryInterface', function ($app) {
            return new SendMailRepository(new SendMail);
        });
 
        // Registrazione Click2CartCatalogInterface
        $this->app->bind('Vola\Repositories\Click2CartCatalog\Click2CartCatalogRepositoryInterface', function ($app) {
            return new Click2CartCatalogRepository(new Click2CartCatalog);
        });
 
    }
}