I have followed the URL git project to connect magento with mongodb. Everything seems to be perfect while integrating.But the problem is when i tried to change any configuration through admin panel(Tried to add a product through admin panel) then its showing some schema error in Cm/Mongo/Model/Indexer/Schema.php file.Can any one suggest me to solve this error.Here are I am posting the error code.
Error:
2014-03-17T09:41:24+00:00 DEBUG (7): Exception message: Notice: Trying to get property of non-object in /var/www/mage2/app/code/community/Cm/Mongo/Model/Indexer/Schema.php on line 45
Trace: #0 /var/www/mage2/app/code/community/Cm/Mongo/Model/Indexer/Schema.php(45): mageCoreErrorHandler(8, 'Trying to get p...', '/var/www/mage2/...', 45, Array)
#1 /var/www/mage2/app/code/community/Cm/Mongo/Model/Indexer.php(116): Cm_Mongo_Model_Indexer_Schema->getEntityIndexers('catalog_product')
#2 /var/www/mage2/app/code/core/Mage/Index/Model/Process.php(331): Cm_Mongo_Model_Indexer->matchEntityAndType('catalog_product', 'mass_action')
#3 [internal function]: Mage_Index_Model_Process->indexEvents('catalog_product', 'mass_action')
#4 /var/www/mage2/app/code/core/Mage/Index/Model/Indexer.php(324): call_user_func_array(Array, Array)
#5 /var/www/mage2/app/code/core/Mage/Index/Model/Indexer.php(171): Mage_Index_Model_Indexer->_runAll('indexEvents', Array)
#6 /var/www/mage2/app/code/core/Mage/CatalogInventory/Model/Observer.php(949): Mage_Index_Model_Indexer->indexEvents('catalog_product', 'mass_action')
#7 /var/www/mage2/app/code/core/Mage/Core/Model/App.php(1338): Mage_CatalogInventory_Model_Observer->reindexProductsMassAction(Object(Varien_Event_Observer))
#8 /var/www/mage2/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_CatalogInventory_Model_Observer), 'reindexProducts...', Object(Varien_Event_Observer))
#9 /var/www/mage2/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('after_reindex_p...', Array)
#10 /var/www/mage2/app/code/core/Mage/Index/Model/Process.php(224): Mage::dispatchEvent('after_reindex_p...')
#11 /var/www/mage2/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#12 /var/www/mage2/app/code/core/Mage/Index/Model/Process.php(249): Mage_Index_Model_Process->reindexEverything()
#13 /var/www/mage2/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(178): Mage_Index_Model_Process->reindexEverything()
#14 /var/www/mage2/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->massReindexAction()
#15 /var/www/mage2/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('massReindex')
Related
I am looking into some legacy code. Php application is throwing an error when I want to edit a page element. Not even sure why it means. Documenttemplateelement has no repeat attribute.
Error:
Exception (Unknown Property) 'yii\base\UnknownPropertyException' with message 'Getting unknown property: common\models\Documenttemplateelement::repeat'
in C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Component.php:154
Stack trace:
#0 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\db\BaseActiveRecord.php(298): yii\base\Component->__get('repeat')
#1 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\helpers\BaseHtml.php(2233): yii\db\BaseActiveRecord->__get('repeat')
#2 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\helpers\BaseHtml.php(1826): yii\helpers\BaseHtml::getAttributeValue(Object(common\models\Documenttemplateelement), 'repeat')
#3 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\helpers\BaseHtml.php(1664): yii\helpers\BaseHtml::activeListInput('dropDownList', Object(common\models\Documenttemplateelement), 'repeat', Array, Array)
#4 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\widgets\ActiveField.php(654): yii\helpers\BaseHtml::activeDropDownList(Object(common\models\Documenttemplateelement), 'repeat', Array, Array)
#5 C:\xampp\htdocs\ddtool\vendor\yii-ui\yii2-materialize\ActiveField.php(189): yii\widgets\ActiveField->dropDownList(Array, Array)
#6 C:\xampp\htdocs\ddtool\backend\views\documentmanager\element.php(50): yiiui\yii2materialize\ActiveField->dropDownList(Array)
#7 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\View.php(348): require('C:\\xampp\\htdocs...')
#8 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\View.php(257): yii\base\View->renderPhpFile('C:\\xampp\\htdocs...', Array)
#9 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\View.php(156): yii\base\View->renderFile('C:\\xampp\\htdocs...', Array, Object(backend\controllers\DocumentmanagerController))
#10 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Controller.php(386): yii\base\View->render('element', Array, Object(backend\controllers\DocumentmanagerController))
#11 C:\xampp\htdocs\ddtool\backend\controllers\DocumentmanagerController.php(228): yii\base\Controller->render('element', Array)
#12 [internal function]: backend\controllers\DocumentmanagerController->actionElementUpdate('137')
#13 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#14 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#15 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Module.php(528): yii\base\Controller->runAction('element-update', Array)
#16 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('documentmanager...', Array)
#17 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#18 C:\xampp\htdocs\ddtool\backend\web\index.php(22): yii\base\Application->run()
#19 {main}
As detailed here https://symfony.com/blog/new-in-symfony-3-1-deprecation-helper-improvements, I've set SYMFONY_DEPRECATIONS_HELPER to a regex of the deprecation message like this in phpunit.xml:
<env name="SYMFONY_DEPRECATIONS_HELPER" value="/Relying on entity queries to check access/" />
However, the resulting backtrace isn't useful at all, as in only shows a trace through the innards of Symfony and PHPUnit and not the code with the deprecation at all:
Self deprecation triggered by Drupal\Tests\MYMODULE\Kernel\ProjectUpdateTest::testProjectCreationCommonsWorker:
Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. See https://www.drupal.org/node/3201242
Stack trace:
#0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(16384, 'a:5:{s:11:"depr...', '/Users/joachim/...', 291, Array)
#1 core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php(150): call_user_func(Array, 16384, 'a:5:{s:11:"depr...', '/Users/joachim/...', 291, Array)
#2 [internal function]: Drupal\Tests\Listeners\DrupalListener->Drupal\Tests\Listeners\{closure}(16384, 'a:5:{s:11:"depr...', '/Users/joachim/...', 291)
#3 /Users/joachim/Sites/MYPROJECT/vendor/symfony/phpunit-bridge/Legacy/SymfonyTestsListenerTrait.php(291): trigger_error('a:5:{s:11:"depr...', 16384)
#4 /Users/joachim/Sites/MYPROJECT/vendor/symfony/phpunit-bridge/Legacy/SymfonyTestsListenerForV7.php(59): Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait->endTest(Object(Drupal\Tests\MYMODULE\Kernel\ProjectUpdateTest), 143.932270373)
#5 core/tests/Drupal/Tests/Listeners/DrupalListener.php(127): Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV7->endTest(Object(Drupal\Tests\MYMODULE\Kernel\ProjectUpdateTest), 143.932270373)
#6 /Users/joachim/Sites/MYPROJECT/vendor/phpunit/phpunit/src/Framework/TestResult.php(450): Drupal\Tests\Listeners\DrupalListener->endTest(Object(Drupal\Tests\MYMODULE\Kernel\ProjectUpdateTest), 143.932270373)
#7 /Users/joachim/Sites/MYPROJECT/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php(377): PHPUnit\Framework\TestResult->endTest(Object(Drupal\Tests\MYMODULE\Kernel\ProjectUpdateTest), 143.932270373)
#8 /Users/joachim/Sites/MYPROJECT/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php(187): PHPUnit\Util\PHP\AbstractPhpProcess->processChildResult(Object(Drupal\Tests\MYMODULE\Kernel\ProjectUpdateTest), Object(PHPUnit\Framework\TestResult), 'a:4:{s:10:"test...', '')
#9 sites/simpletest/TestCase.php(903): PHPUnit\Util\PHP\AbstractPhpProcess->runTestJob('<?php\nuse PHPUn...', Object(Drupal\Tests\MYMODULE\Kernel\ProjectUpdateTest), Object(PHPUnit\Framework\TestResult))
#10 /Users/joachim/Sites/MYPROJECT/vendor/phpunit/phpunit/src/Framework/TestSuite.php(677): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#11 /Users/joachim/Sites/MYPROJECT/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(673): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#12 /Users/joachim/Sites/MYPROJECT/vendor/phpunit/phpunit/src/TextUI/Command.php(143): PHPUnit\TextUI\TestRunner->run(Object(PHPUnit\Framework\TestSuite), Array, Array, true)
#13 /Users/joachim/Sites/MYPROJECT/vendor/phpunit/phpunit/src/TextUI/Command.php(96): PHPUnit\TextUI\Command->run(Array, true)
#14 /Users/joachim/Sites/MYPROJECT/vendor/phpunit/phpunit/phpunit(98): PHPUnit\TextUI\Command::main()
#15 /Users/joachim/Sites/MYPROJECT/vendor/bin/phpunit(120): include('/Users/joachim/...')
#16 {main}
How do I get it to show the relevant information?
I'm running code available here under feature-1-login branch:
https://github.com/dzidlicious/invest-tracker
After running the docker-compose up and accessing the BACKEND part of the application, I'm getting the following stack trace:
yii\base\ErrorException: Exception (Invalid Configuration) 'yii\base\InvalidConfigException' with message 'The directory does not exist: '
in /app/vendor/yiisoft/yii2/web/AssetManager.php:236
Stack trace:
#0 /app/vendor/yiisoft/yii2/web/AssetManager.php(546): yii\web\AssetManager->checkBasePathPermission()
#1 /app/vendor/yiisoft/yii2/web/AssetManager.php(478): yii\web\AssetManager->publishDirectory('/app/vendor/yii...', Array)
#2 /app/vendor/yiisoft/yii2/web/AssetBundle.php(181): yii\web\AssetManager->publish('/app/vendor/yii...', Array)
#3 /app/vendor/yiisoft/yii2/web/AssetManager.php(292): yii\web\AssetBundle->publish(Object(yii\web\AssetManager))
#4 /app/vendor/yiisoft/yii2/web/AssetManager.php(263): yii\web\AssetManager->loadBundle('yii\\validators\\...', Array, true)
#5 /app/vendor/yiisoft/yii2/web/View.php(287): yii\web\AssetManager->getBundle('yii\\validators\\...')
#6 /app/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\web\View->registerAssetBundle('yii\\validators\\...')
#7 /app/vendor/yiisoft/yii2/validators/RequiredValidator.php(93): yii\web\AssetBundle::register(Object(yii\web\View))
#8 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(833): yii\validators\RequiredValidator->clientValidateAttribute(Object(common\models\LoginForm), 'username', Object(yii\web\View))
#9 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(233): yii\widgets\ActiveField->getClientOptions()
#10 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(223): yii\widgets\ActiveField->begin()
#11 /app/vendor/yiisoft/yii2-bootstrap4/src/ActiveField.php(244): yii\widgets\ActiveField->render('<label for="log...')
#12 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(176): yii\bootstrap4\ActiveField->render()
#13 /app/backend/views/site/login.php(27): yii\widgets\ActiveField->__toString()
#14 /app/vendor/yiisoft/yii2/base/View.php(348): require('/app/backend/vi...')
#15 /app/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/app/backend/vi...', Array)
#16 /app/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/app/backend/vi...', Array, Object(backend\controllers\SiteController))
#17 /app/vendor/yiisoft/yii2/base/Controller.php(410): yii\base\View->render('login', Array, Object(backend\controllers\SiteController))
#18 /app/backend/controllers/SiteController.php(87): yii\base\Controller->render('login', Array)
#19 [internal function]: backend\controllers\SiteController->actionLogin()
#20 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#21 /app/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#22 /app/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction('login', Array)
#23 /app/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction('site/login', Array)
#24 /app/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Application->handleRequest(Object(yii\web\Request))
#25 /app/backend/web/index.php(17): yii\base\Application->run()
#26 {main} in /app/vendor/yiisoft/yii2/base/ErrorHandler.php:343
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleError(256, 'Exception (Inva...', '/app/vendor/yii...', 343, Array)
#1 /app/vendor/yiisoft/yii2/base/ErrorHandler.php(343): trigger_error('Exception (Inva...', 256)
#2 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(178): yii\base\ErrorHandler::convertExceptionToError(Object(yii\base\InvalidConfigException))
#3 /app/backend/views/site/login.php(27): yii\widgets\ActiveField->__toString()
#4 /app/vendor/yiisoft/yii2/base/View.php(348): require('/app/backend/vi...')
#5 /app/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/app/backend/vi...', Array)
#6 /app/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/app/backend/vi...', Array, Object(backend\controllers\SiteController))
#7 /app/vendor/yiisoft/yii2/base/Controller.php(410): yii\base\View->render('login', Array, Object(backend\controllers\SiteController))
#8 /app/backend/controllers/SiteController.php(87): yii\base\Controller->render('login', Array)
#9 [internal function]: backend\controllers\SiteController->actionLogin()
#10 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /app/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#12 /app/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction('login', Array)
#13 /app/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction('site/login', Array)
#14 /app/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Application->handleRequest(Object(yii\web\Request))
#15 /app/backend/web/index.php(17): yii\base\Application->run()
#16 {main}
I have intentionally committed my config files and attached a screenshot.
That error happens because you are missing the backend/web/assets folder and the server does not have the permissions to create it.
Check the owner and permissions of backend/web if the server can't write it, it won't be able to create the assets folder.
You could update backend/web and make it server-writable.
You can also create backend/web/assets manually, then update the permissions and give the server group rw permissions, or run init on the project root, if you are sure that nothing you have modified will be overwritten.
I am very new to PHP, can someone help me to fix this issue. When i run the command composer install, I am getting this error.
[2020-12-08 10:28:26] production.ERROR: Class mailer does not exist {"exception":"[object] (ReflectionException(code: -1): Class mailer does not exist at /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php:767)
[stacktrace]
#0 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('mailer')
#1 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('mailer')
#2 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('mailer', Array)
#3 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(734): Illuminate\Container\Container->make('mailer', Array)
#4 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(1210): Illuminate\Foundation\Application->make('mailer')
#5 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(161): Illuminate\Container\Container->offsetGet('mailer')
#6 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(130): Illuminate\Support\Facades\Facade::resolveFacadeInstance('mailer')
#7 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(217): Illuminate\Support\Facades\Facade::getFacadeRoot()
#8 /var/www/cachet/app/Exceptions/Handler.php(83): Illuminate\Support\Facades\Facade::__callStatic('send', Array)
#9 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(314): CachetHQ\Cachet\Exceptions\Handler->report(Object(ErrorException))
#10 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(118): Illuminate\Foundation\Http\Kernel->reportException(Object(ErrorException))
#11 /var/www/cachet/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#12 {main}
"}
I am trying to organize my project (lumen / laravel) in such a way that my controls are in subfolders to have more control. I am following the official lumen guide (https://lumen.laravel.com/docs/6.x/controllers) but the problem is as follows:
In my route file (routes/web.php) I have the following code:
<?php
$router->get('test', 'Photos\TestController#show');
And my controller is located in the path app/Http/Controllers/Photos/TestController.php and has the following code:
<?php
namespace App\Http\Controllers;
class TestController extends Controller
{
public function show(){
return "hello";
}
}
But at the time of making a request to the url http://localhost/myproject/public/test I get the following message:
Click to view
And in my log file (storage/logs/lumen-xx-xx-xx.log) I get the following error:
[2020-01-19 02:59:12] local.ERROR: ReflectionException: Class App\Http\Controllers\Photos\TestController does not exist in C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php:803
Stack trace:
#0 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(803): ReflectionClass->__construct('App\\Http\\Contro...')
#1 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(681): Illuminate\Container\Container->build('App\\Http\\Contro...')
#2 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(629): Illuminate\Container\Container->resolve('App\\Http\\Contro...', Array)
#3 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Application.php(267): Illuminate\Container\Container->make('App\\Http\\Contro...', Array)
#4 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(311): Laravel\Lumen\Application->make('App\\Http\\Contro...')
#5 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(278): Laravel\Lumen\Application->callControllerAction(Array)
#6 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(263): Laravel\Lumen\Application->callActionOnArrayBasedRoute(Array)
#7 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(165): Laravel\Lumen\Application->handleFoundRoute(Array)
#8 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(416): Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(Object(Laravel\Lumen\Http\Request))
#9 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(171): Laravel\Lumen\Application->sendThroughPipeline(Array, Object(Closure))
#10 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(108): Laravel\Lumen\Application->dispatch(NULL)
#11 C:\xampp\htdocs\colegio\public\index.php(28): Laravel\Lumen\Application->run()
#12 {main}
Next Illuminate\Contracts\Container\BindingResolutionException: Target class [App\Http\Controllers\Photos\TestController] does not exist. in C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php:805
Stack trace:
#0 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(681): Illuminate\Container\Container->build('App\\Http\\Contro...')
#1 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(629): Illuminate\Container\Container->resolve('App\\Http\\Contro...', Array)
#2 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Application.php(267): Illuminate\Container\Container->make('App\\Http\\Contro...', Array)
#3 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(311): Laravel\Lumen\Application->make('App\\Http\\Contro...')
#4 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(278): Laravel\Lumen\Application->callControllerAction(Array)
#5 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(263): Laravel\Lumen\Application->callActionOnArrayBasedRoute(Array)
#6 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(165): Laravel\Lumen\Application->handleFoundRoute(Array)
#7 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(416): Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(Object(Laravel\Lumen\Http\Request))
#8 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(171): Laravel\Lumen\Application->sendThroughPipeline(Array, Object(Closure))
#9 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(108): Laravel\Lumen\Application->dispatch(NULL)
#10 C:\xampp\htdocs\colegio\public\index.php(28): Laravel\Lumen\Application->run()
#11 {main} {"exception":"[object] (Illuminate\\Contracts\\Container\\BindingResolutionException(code: 0): Target class [App\\Http\\Controllers\\Photos\\TestController] does not exist. at C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php:805)
[stacktrace]
#0 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(681): Illuminate\\Container\\Container->build('App\\\\Http\\\\Contro...')
#1 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(629): Illuminate\\Container\\Container->resolve('App\\\\Http\\\\Contro...', Array)
#2 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Application.php(267): Illuminate\\Container\\Container->make('App\\\\Http\\\\Contro...', Array)
#3 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(311): Laravel\\Lumen\\Application->make('App\\\\Http\\\\Contro...')
#4 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(278): Laravel\\Lumen\\Application->callControllerAction(Array)
#5 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(263): Laravel\\Lumen\\Application->callActionOnArrayBasedRoute(Array)
#6 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(165): Laravel\\Lumen\\Application->handleFoundRoute(Array)
#7 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(416): Laravel\\Lumen\\Application->Laravel\\Lumen\\Concerns\\{closure}(Object(Laravel\\Lumen\\Http\\Request))
#8 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(171): Laravel\\Lumen\\Application->sendThroughPipeline(Array, Object(Closure))
#9 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(108): Laravel\\Lumen\\Application->dispatch(NULL)
#10 C:\\xampp\\htdocs\\colegio\\public\\index.php(28): Laravel\\Lumen\\Application->run()
#11 {main}
[previous exception] [object] (ReflectionException(code: -1): Class App\\Http\\Controllers\\Photos\\TestController does not exist at C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php:803)
[stacktrace]
#0 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(803): ReflectionClass->__construct('App\\\\Http\\\\Contro...')
#1 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(681): Illuminate\\Container\\Container->build('App\\\\Http\\\\Contro...')
#2 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(629): Illuminate\\Container\\Container->resolve('App\\\\Http\\\\Contro...', Array)
#3 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Application.php(267): Illuminate\\Container\\Container->make('App\\\\Http\\\\Contro...', Array)
#4 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(311): Laravel\\Lumen\\Application->make('App\\\\Http\\\\Contro...')
#5 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(278): Laravel\\Lumen\\Application->callControllerAction(Array)
#6 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(263): Laravel\\Lumen\\Application->callActionOnArrayBasedRoute(Array)
#7 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(165): Laravel\\Lumen\\Application->handleFoundRoute(Array)
#8 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(416): Laravel\\Lumen\\Application->Laravel\\Lumen\\Concerns\\{closure}(Object(Laravel\\Lumen\\Http\\Request))
#9 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(171): Laravel\\Lumen\\Application->sendThroughPipeline(Array, Object(Closure))
#10 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(108): Laravel\\Lumen\\Application->dispatch(NULL)
#11 C:\\xampp\\htdocs\\colegio\\public\\index.php(28): Laravel\\Lumen\\Application->run()
#12 {main}
"}
I would like to know what I am doing wrong, since I read the documentation several times and I still can't find the solution, I also searched the internet and nobody has asked about it. Thank you very much in advance.
Since your controllers are located in a subfolder, therefore you need to change also the namespace of it by adding the subfolder of it like below.
namespace App\Http\Controllers\Photos
Then to be able to extend your controller to a Controller class. Put this code also.
use App\Http\Controllers\Controller