В чём моя ошибка при связывании Интерфейса с реализацией в Laravel

Прохожу тему сервис-провайдеров в Laravel. В качестве теста решил связать реализацию с интерфейсом. Интерфейс - app/Interfaces/MyTestInterface Реализация - components/MyTestClass Ошибка в том, что локальный сервер вылетает и каждый раз перезапускается на новом порту. А вот моё решение:

Сервис-провайдер:

namespace App\Providers;

use App\Interfaces\MyTestInterface;
use Illuminate\Support\ServiceProvider;
use components\MyTestClass;

class MyTestProvider extends ServiceProvider
{
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->bind(MyTestInterface::class,
            MyTestClass::class);
    }

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }
}

Интерфейс:

namespace App\Interfaces;

    interface MyTestInterface
    {
        public function printName();
    }

Реализация:

namespace components;

use App\Interfaces\MyTestInterface;

class MyTestClass
{
    protected $obj;

    public function __construct(MyTestInterface $obj)
    {
        $this->obj = $obj;
    }

    public function printName()
    {
        return 'Alex';
    }
}

Применение в контроллере:

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Interfaces\MyTestInterface as Test;

class MyTestController extends Controller
{
    protected $test;

    public function __construct(Test $test)
    {
        $this->test = $test;
    }

    public function index()
    {
        return $this->test->printName();
    }
}

Ответы (1 шт):

Автор решения: segamolder

MyTestClass должен наследовать (implements) интерфейс

→ Ссылка