31 lines
568 B
PHP
31 lines
568 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\Services\UserService;
|
|
use Illuminate\Contracts\Foundation\Application;
|
|
use App\Models\User;
|
|
|
|
class UserServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
|
|
$this->app->bind(UserService::class, function (Application $app) {
|
|
return new UserService($app->make(User::class));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
//
|
|
}
|
|
}
|