Slim Application Error
The application could not run because of the following error:

Details
Type: Error
Code: 0
Message: Call to a member function connection() on null
File: /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php
Line: 1820
Trace
#0 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1786): Illuminate\Database\Eloquent\Model::resolveConnection(NULL)
#1 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1578): Illuminate\Database\Eloquent\Model->getConnection()
#2 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1497): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()
#3 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1533): Illuminate\Database\Eloquent\Model->newModelQuery()
#4 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1486): Illuminate\Database\Eloquent\Model->newQueryWithoutScopes()
#5 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1476): Illuminate\Database\Eloquent\Model->newQuery()
#6 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(674): Illuminate\Database\Eloquent\Model::query()
#7 /Applications/MAMP/htdocs/taskcrusher/app/routes.php(23): Illuminate\Database\Eloquent\Model::all()


my dependencies.php files:
addDefinitions([
 LoggerInterface::class => function (ContainerInterface $c) {
 $settings = $c->get(SettingsInterface::class);

 $loggerSettings = $settings->get('logger');
 $logger = new Logger($loggerSettings['name']);

 $processor = new UidProcessor();
 $logger->pushProcessor($processor);

 $handler = new StreamHandler($loggerSettings['path'], $loggerSettings['level']);
 $logger->pushHandler($handler);

 return $logger;
 },
 // Google\_Client::class => function ($container) {
 // $client = new Google\_Client();
 // $authUrl = $client->createAuthUrl([
 // 'redirect\_uri' => (string) $container->withPath('/auth/google/callback')
 // ]);
 // // configure the client with your Google API credentials
 // return $authUrl;
 // },

 Google\_Client::class => function ($container) {
 $client = new Google\_Client();
 // $client->setClientId('YOUR\_CLIENT\_ID');
 // $client->setClientSecret('YOUR\_CLIENT\_SECRET');
 // $client->setRedirectUri('http://localhost:8888/auth/google/callback');
 $client->addScope(Google\_Service\_Calendar::CALENDAR);
 // $client->createAuthUrl([
 // 'redirect\_uri' => (string) $container->withPath('');
 // configure the client with your Google API credentials
 return $client;
 },
 
 GoogleAuth::class => function ($container) {
 $client = $container->get(Google\_Client::class);
 return new GoogleAuth($client);
 },

 AuthController::class => function (ContainerInterface $c) {
 $googleAuth = $c->get(GoogleAuth::class);
 return new AuthController($googleAuth);
 },
 AuthMiddleware::class => fn() => new AuthMiddleware(),
 CalendarController::class => function (ContainerInterface $c) {
 return new CalendarController();
 },
 ]);

 $containerBuilder->addDefinitions([
 'db' => function (ContainerInterface $c) {
 $settings = $c->get(SettingsInterface::class);
 $dbSettings = $settings->get('db');
 
 $capsule = new Capsule;
 $capsule->addConnection($dbSettings);
 $capsule->setAsGlobal();
 $capsule->bootEloquent();
 // echo '
```
'; die( var_dump( $capsule ) . '
```
');
 
 return $capsule->getDatabaseManager();
 },
 User::class => function (ContainerInterface $c) {
 $user = new User();
 $user->setConnectionResolver($c->get('db')->getDatabaseManager());
 return $user;
 },
 ]);
 $containerBuilder->addDefinitions([
 'view' => function (ContainerInterface $c) {
 $settings = $c->get(SettingsInterface::class);
 $twigSettings = $settings->get('twig');

 $view = Twig::create(
 $twigSettings['path'],
 ['cache' => $twigSettings['cache\_enabled'] ? $twigSettings['cache\_path'] : false]
 );

 return $view;
 },
 ]);
};
슬림 애플리케이션 오류다음 오류로 인해 애플리케이션을 실행할 수 없습니다:세부 정보유형: 오류코드: 0메시지: null에 대한 멤버 함수 connection() 호출파일: /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php라인: 1820Trace#0 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1786) Illuminate\Database\Eloquent\Model::resolveConnection(NULL)#1 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1578): Illuminate\Database\Eloquent\Model->getConnection()#2 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1497): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()#3 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1533): Illuminate\Database\Eloquent\Model->newModelQuery()#4 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1486): Illuminate\Database\Eloquent\Model->newQueryWithoutScopes()#5 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(1476): Illuminate\Database\Eloquent\Model->newQuery()#6 /Applications/MAMP/htdocs/taskcrusher/vendor/illuminate/database/Eloquent/Model.php(674): Illuminate\Database\Eloquent\Model::query()#7 /Applications/MAMP/htdocs/taskcrusher/app/routes.php(23): Illuminate\Database\Eloquent\Model::all()내 의존성.php 파일을 추가합니다:addDefinitions([ LoggerInterface::class => function (ContainerInterface $c) { settings = $c->get(SettingsInterface::class); loggerSettings = $settings->get('logger'); logger = 새 로거($loggerSettings['name']); 프로세서 = 새로운 UidProcessor(); 로거->푸시프로세서($프로세서); handler = new StreamHandler($loggerSettings['path'], $loggerSettings['level']); 로거->푸시핸들러($핸들러); return $logger; }, // Google\_Client::class => function ($container) { // $client = new Google\_Client(); // $authUrl = $client->createAuthUrl([ // 'redirect\_uri' => (문자열) $container->withPath('/auth/google/callback') // ]); // // Google API 자격 증명으로 클라이언트를 구성합니다. // 반환 $authUrl; // }, Google\_Client::class => function ($container) { client = new Google\_Client(); // $client->setClientId('YOUR\_CLIENT\_ID'); // $client->setClientSecret('YOUR\_CLIENT\_SECRET'); // $client->setRedirectUri('http://localhost:8888/auth/google/callback'); client->addScope(Google\_Service\_Calendar::CALENDAR); // $client->createAuthUrl([[ // 'redirect\_uri' => (문자열) $container->withPath(''); // 구글 API 자격 증명으로 클라이언트를 구성합니다. 반환 $client; },  GoogleAuth::class => function ($container) { client = $container->get(Google\_Client::class); return new GoogleAuth($client); }, AuthController::class => function (ContainerInterface $c) {. googleAuth = $c->get(GoogleAuth::class); return new AuthController($googleAuth); }, AuthMiddleware::class => fn() => new AuthMiddleware(), CalendarController::class => function (ContainerInterface $c) {. return new CalendarController(); }, ]); 컨테이너 빌더-> 추가 정의([ 'db' => function (ContainerInterface $c) {[} }) settings = $c->get(SettingsInterface::class); dbSettings = $settings->get('db');  캡슐 = 새로운 캡슐; 캡슐->애드커넥션($dbSettings); 캡슐->setAsGlobal(); 캡슐->bootEloquent(); // echo '```'; die( var_dump( $capsule ) . '```');  반환 $capsule->getDatabaseManager(); }, User::class => function (ContainerInterface $c) { user = new User(); user->setConnectionResolver($c->get('db')->getDatabaseManager()); return $user; }, ]); 컨테이너 빌더-> 추가 정의([[ 'view' => function (ContainerInterface $c) {. settings = $c->get(SettingsInterface::class); twigSettings = $settings->get('twig'); view = Twig::create( twigSettings['경로'], ['캐시' => $twigSettings['캐시\_enabled'] ? twigSettings['cache\_path'] : false] ); 반환 $view; }, ]);};