running php artisan : Class 'Route' not found - laravel

I just took new project, and I'm running into a blocking issue.
When running php artisan without any argument it throws the following error :
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Route' not found
When running the website homepage, I have an exception and the stack trace found in the logs is the following :
[2017-07-17 13:07:07] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Route' not found in C:\wamp64\www\myproject\routes\api.php:16
Stack trace:
#0 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Routing\Router.php(329): require()
#1 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Routing\Router.php(285): Illuminate\Routing\Router->loadRoutes('C:\\wamp64\\www\\S...')
#2 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Routing\RouteRegistrar.php(104): Illuminate\Routing\Router->group(Array, 'C:\\wamp64\\www\\S...')
#3 C:\wamp64\www\myproject\app\Providers\RouteServiceProvider.php(71): Illuminate\Routing\RouteRegistrar->group('C:\\wamp64\\www\\S...')
#4 C:\wamp64\www\myproject\app\Providers\RouteServiceProvider.php(38): App\Providers\RouteServiceProvider->mapApiRoutes()
#5 [internal function]: App\Providers\RouteServiceProvider->map()
#6 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(29): call_user_func_array(Array, Array)
#7 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#8 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#9 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Container\Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#10 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Support\Providers\RouteServiceProvider.php(71): Illuminate\Container\Container->call(Array)
#11 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Support\Providers\RouteServiceProvider.php(30): Illuminate\Foundation\Support\Providers\RouteServiceProvider->loadRoutes()
#12 C:\wamp64\www\myproject\app\Providers\RouteServiceProvider.php(28): Illuminate\Foundation\Support\Providers\RouteServiceProvider->boot()
#13 [internal function]: App\Providers\RouteServiceProvider->boot()
#14 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(29): call_user_func_array(Array, Array)
#15 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#16 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#17 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Container\Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#18 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(788): Illuminate\Container\Container->call(Array)
#19 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(771): Illuminate\Foundation\Application->bootProvider(Object(App\Providers\RouteServiceProvider))
#20 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(App\Providers\RouteServiceProvider), 17)
#21 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(772): array_walk(Array, Object(Closure))
#22 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\BootProviders.php(17): Illuminate\Foundation\Application->boot()
#23 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(208): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#24 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#25 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(146): Illuminate\Foundation\Http\Kernel->bootstrap()
#26 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#27 C:\wamp64\www\myproject\public\index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#28 {main}
I'm very new to laravel, so that might be a newbie mistake, but I didn't manage to find a solution on my own. Can someone help me ?
Thank you for your time.
EDIT:
The culprit was a colleague who wanted to add a "features" array at the end of the config/app.php, and misnamed it "aliases". So everything previously defined was lost.

As I see this question has not been answered for over a month now,
Go to the file where you've used Route::method_name() and import Route class there by->
use Route;
This is common in App\Providers\AppServiceProvider#boot() that implements
Route::resourceVerbs([...]);
Let me know if this helps

In my case I've typed Routes instead of Route.
So pay attention to similar errors like this. Write well the sentences.

Thanks to Thomas Moors, the problem was found.
In the app.php, what was expected :
'aliases' => [
[...]
],
'features' => [
[...]
],
Except instead of 'features' a mistake was made :
'aliases' => [
[...]
],
'aliases' => [
[...]
],
So yeah, nothing worked as expected. Thanks everyone.

Related

magento 2 Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowed

I'm getting this error in magento 2. I didn't do any updates, this error just suddenly appeared.
I see that I have to remove the "after" attribute, but where can I find where?
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowed.
Line: 1251
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowed.
Line: 1251
#0 /www/htdocs/domain/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 /www/htdocs/domain/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/www/htdocs/w00...', '%message%\nLine:...')
#2 /www/htdocs/domain/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /www/htdocs/domain/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#4 /www/htdocs/domain/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#5 /www/htdocs/domain/vendor/magento/framework/View/Model/Layout/Update/Validator.php(125): Magento\Framework\Config\DomFactory->createDom(Array)
#6 /www/htdocs/domain/vendor/magento/framework/View/Model/Layout/Merge.php(461): Magento\Framework\View\Model\Layout\Update\Validator->isValid('<layout xmlns:x...', 'layout_merged', false)
#7 /www/htdocs/domain/vendor/magento/framework/View/Model/Layout/Merge.php(442): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '<body>\n <refe...')
#8 /www/htdocs/domain/generated/code/Magento/Framework/View/Model/Layout/Merge/Interceptor.php(193): Magento\Framework\View\Model\Layout\Merge->load(Array)
#9 /www/htdocs/domain/vendor/magento/framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge\Interceptor->load()
#10 /www/htdocs/domain/vendor/magento/framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
#11 /www/htdocs/domain/vendor/magento/framework/View/Layout.php(254): Magento\Framework\View\Layout\Builder->build()
#12 /www/htdocs/domain/vendor/magento/framework/View/Layout.php(875): Magento\Framework\View\Layout->build()
#13 /www/htdocs/domain/generated/code/Magento/Framework/View/Layout/Interceptor.php(414): Magento\Framework\View\Layout->getBlock('page_content_he...')
#14 /www/htdocs/domain/vendor/magento/module-cms/Helper/Page.php(171): Magento\Framework\View\Layout\Interceptor->getBlock('page_content_he...')
#15 /www/htdocs/domain/vendor/magento/module-cms/Controller/Noroute/Index.php(44): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Noroute\Index\Interceptor), 'no-route')
#16 /www/htdocs/domain/generated/code/Magento/Cms/Controller/Noroute/Index/Interceptor.php(24): Magento\Cms\Controller\Noroute\Index->execute()
#17 /www/htdocs/domain/vendor/magento/framework/App/Action/Action.php(107): Magento\Cms\Controller\Noroute\Index\Interceptor->execute()
#18 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Noroute\Index\Interceptor->___callParent('dispatch', Array)
#20 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Noroute\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#21 /www/htdocs/domain/generated/code/Magento/Cms/Controller/Noroute/Index/Interceptor.php(39): Magento\Cms\Controller\Noroute\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#22 /www/htdocs/domain/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Noroute\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#25 /www/htdocs/domain/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#26 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#27 /www/htdocs/domain/vendor/mirasvit/module-search-autocomplete/src/SearchAutocomplete/Plugin/ResponsePlugin.php(157): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#28 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(135): Mirasvit\SearchAutocomplete\Plugin\ResponsePlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#29 /www/htdocs/domain/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#30 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#31 /www/htdocs/domain/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#32 /www/htdocs/domain/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#33 /www/htdocs/domain/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#34 /www/htdocs/domain/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#35 /www/htdocs/domain/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#36 {main}
I see that I have to remove the "after" attribute, but where can I find where?
thanks
You can not add after attribute in referenceContainer. If you want to move Container then use it.
<move element="element name" destination="where you want to move" after="">
I think, You are using magento2.2 version. In this version, There is some modification in layout xml. You can not use after and before attribute in referenceContainer tag.
To solve this issue, You have to remove after and before attribute from referenceContainer.
you can use move tag for rearranging layout
You will have to add a new ticket to extension support because this is extension problem. You can check all the xml file in path app/code/vendor_name/module_name/view/frontend/layout/
As zed stated, this looks more like an upgrade issue to v2.2.x as they made the layout formatting stricter and some things which were allowed before are no longer.
The before and after attributes in referenceContainer tags are no longer valid.
Also we found that a move tag was also no longer allowed inside a referenceBlock tag either.
To find where these issues were at, I went into the vendor/magento/framework/Config/Dom.php file and in the _initDom() method output the $xml variable to find the actual xml code at line xxx per an exception like the one OP has above.

Laravel 5: Issue with Eloquent lists method

I can't make heads or tails of the issue I'm having right now but here's what's happening, I'm having an issue with the Eloquent lists method.
The following line:
dd(Quiz::lists('name', 'id')->all());
Returns this error:
ErrorException: explode() expects parameter 2 to be string, array given
The stack trace doesn't really seem to be giving me much to work with either:
[2015-11-10 10:48:17] testing.ERROR: exception 'ErrorException' with message 'explode() expects parameter 2 to be string, array given' in /home/vagrant/.composer/vendor/illuminate/support/helpers.php:404
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'explode() expec...', '/home/vagrant/....', 404, Array)
#1 /home/vagrant/.composer/vendor/illuminate/support/helpers.php(404): explode('.', Array)
#2 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Support/Arr.php(319): data_get(Object(stdClass), Array)
#3 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Support/Collection.php(428): Illuminate\Support\Arr::pluck(Array, 'name', 'id')
#4 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1572): Illuminate\Support\Collection->pluck('name', 'id')
#5 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(244): Illuminate\Database\Query\Builder->lists('name', 'id')
#6 [internal function]: Illuminate\Database\Eloquent\Builder->lists('name', 'id')
#7 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3482): call_user_func_array(Array, Array)
#8 [internal function]: Illuminate\Database\Eloquent\Model->__call('lists', Array)
#9 [internal function]: App\Quiz->lists('name', 'id')
#10 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3496): call_user_func_array(Array, Array)
#11 /home/vagrant/Web/Laravel/careers_app_server/app/Http/Controllers/QuizController.php(21): Illuminate\Database\Eloquent\Model::__callStatic('lists', Array)
#12 /home/vagrant/Web/Laravel/careers_app_server/app/Http/Controllers/QuizController.php(21): App\Quiz::lists('name', 'id')
#13 [internal function]: App\Http\Controllers\QuizController->index()
#14 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#15 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('index', Array)
#16 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\QuizController), Object(Illuminate\Routing\Route), 'index')
#17 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#18 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#19 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#21 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#22 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(69): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\QuizController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'index')
#23 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\\Http\\Contro...', 'index')
#24 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#25 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/Router.php(704): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#26 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#27 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#28 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#29 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#30 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/Router.php(706): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#31 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/Router.php(671): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#32 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Routing/Router.php(631): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#33 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#34 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#35 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#36 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#38 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#39 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#40 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Foundation/Testing/CrawlerTrait.php(393): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#41 /home/vagrant/Web/Laravel/careers_app_server/vendor/laravel/framework/src/Illuminate/Foundation/Testing/CrawlerTrait.php(70): Illuminate\Foundation\Testing\TestCase->call('GET', 'api/quiz', Array, Array, Array, Array)
#42 /home/vagrant/Web/Laravel/careers_app_server/tests/QuizTest.php(27): Illuminate\Foundation\Testing\TestCase->get('api/quiz')
#43 [internal function]: QuizTest->testRequestQuizList()
#44 /home/vagrant/Web/Laravel/careers_app_server/vendor/phpunit/phpunit/src/Framework/TestCase.php(909): ReflectionMethod->invokeArgs(Object(QuizTest), Array)
#45 /home/vagrant/Web/Laravel/careers_app_server/vendor/phpunit/phpunit/src/Framework/TestCase.php(768): PHPUnit_Framework_TestCase->runTest()
#46 /home/vagrant/Web/Laravel/careers_app_server/vendor/phpunit/phpunit/src/Framework/TestResult.php(612): PHPUnit_Framework_TestCase->runBare()
#47 /home/vagrant/Web/Laravel/careers_app_server/vendor/phpunit/phpunit/src/Framework/TestCase.php(724): PHPUnit_Framework_TestResult->run(Object(QuizTest))
#48 /home/vagrant/Web/Laravel/careers_app_server/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
#49 /home/vagrant/Web/Laravel/careers_app_server/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#50 /home/vagrant/Web/Laravel/careers_app_server/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(440): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#51 /home/vagrant/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php(154): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#52 /home/vagrant/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php(105): PHPUnit_TextUI_Command->run(Array, true)
#53 /home/vagrant/.composer/vendor/phpunit/phpunit/phpunit(47): PHPUnit_TextUI_Command::main()
#54 {main}
I have tested the issue with multiple different models and the issue remained. Could it be environment related? This error occurs when running tests with PHPUnit, I haven't tried it in a non-testing environment yet. Will update post once I have.
Some info:
Laravel version: 5.1.11
Server: Homestead default
EDIT #1
After some testing I found out that the issue only occurs within PHPUnit tests, in the testing environment. The issue does not occur when the method is called via a regular request.
Problem solved. It appears that the clue was in the following line of my laravel.log:
#1 /home/vagrant/.composer/vendor/illuminate/support/helpers.php(404): explode('.', Array)
I figured since my Homestead box has been installed a while ago the dependencies from that directory have never been updated, so a quick composer update inside of /home/vagrant/.composer did the trick.

Magento - Page error after altering code slightly

So I was editing a page for magento, simply adding a product brands slider, but it unfortunately somehow crashed the page. I reindexed everything and flushed cache to no avail. So I just reverted back to the old code, reflushed, but still the page is broken. The error report it has given me is;
a:5:{i:0;s:127:"Invalid method Mage_Page_Block_Html_Topmenu::renderCategoriesMenuHtml(Array
(
[0] =>
[1] => 0
[2] => level-top
)
)";i:1;s:4574:"#0 /home4/johnsoja/public_html/magento1/app/design/frontend/ultimo/default/template/page/html/topmenu.phtml(43): Varien_Object->__call('renderCategorie...', Array)
#1 /home4/johnsoja/public_html/magento1/app/design/frontend/ultimo/default/template/page/html/topmenu.phtml(43): Mage_Page_Block_Html_Topmenu->renderCategoriesMenuHtml(false, 0, 'level-top')
#2 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(241): include('/home4/johnsoja...')
#3 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/ultimo...')
#4 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#6 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#7 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#8 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#9 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('topMenu', true)
#10 /home4/johnsoja/public_html/magento1/app/design/frontend/ultimo/default/template/page/html/header.phtml(108): Mage_Core_Block_Abstract->getChildHtml('topMenu')
#11 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(241): include('/home4/johnsoja...')
#12 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/ultimo...')
#13 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#14 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#15 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#16 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('header', true)
#17 /home4/johnsoja/public_html/magento1/app/design/frontend/ultimo/default/template/page/1column.phtml(42): Mage_Core_Block_Abstract->getChildHtml('header')
#18 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(241): include('/home4/johnsoja...')
#19 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/ultimo...')
#20 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#21 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#22 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#23 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#24 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#25 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#26 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#27 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#28 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#29 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#30 /home4/johnsoja/public_html/magento1/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#31 /home4/johnsoja/public_html/magento1/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#32 /home4/johnsoja/public_html/magento1/index.php(87): Mage::run('', 'store')
#33 {main}";s:3:"url";s:10:"/magento1/";s:11:"script_name";s:19:"/magento1/index.php";s:4:"skin";s:7:"default";}
I am still very new to Magento, so all this really doesn't tell me much. I also would figure stripping the code post crash and reindexing should work, because I really didn't add much, but I may be completely mistaken on how it all works. Can anyone point me in a direction?! Thanks!
So it looks like the file app/design/frontend/ultimo/default/template/page/html/topmenu.phtml at line 43 is calling
$this->renderCategoriesMenuHtml();
But actually that function renderCategoriesMenuHtml() is in the class Mage_Catalog_Block_Navigation (whereas topMenu.phtml is running in class Mage_Page_Block_Html_Topmenu)
I suspect the root cause is an issue with an XML file, for example app/design/frontend/ultimo/default/layout/local.xml search for the block with the name 'topMenu' and look at its type="page/html_topmenu"
Now it gets a bit tricky for me. The block type should either be a theme specific block like type="ultimo_page/html_topmenu" assuming the file app/code/local/ultimo/page/block/tml/topMenu.php exists or else this 'topMenu' block needs to contain a nested block of type="catalog/navigation".
To begin with it might be best to comment out that line 43 $this->renderCategoriesMenuHtml(); to recover your Magento Store and then investigate how to render the category menu.

Magento empty blank product page

I got some problems with my magento store. The product page view is empty.
I've debugged it and in the exception log I got this message:
2014-02-18T21:45:34+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Method "addJqueryLibrary" is not defined in "Magentothem_Upsellslider_Model_Layout_Generate_Observer"' in /home/mellimello/public_html/app/Mage.php:595
Stack trace:
#0 /home/mellimello/public_html/app/code/core/Mage/Core/Model/App.php(1340): Mage::throwException('Method "addJque...')
#1 /home/mellimello/public_html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Magentothem_Upsellslider_Model_Layout_Generate_Observer), 'addJqueryLibrar...', Object(Varien_Event_Observer))
#2 /home/mellimello/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#3 /home/mellimello/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(351): Mage::dispatchEvent('controller_acti...', Array)
#4 /home/mellimello/public_html/app/code/core/Mage/Catalog/Helper/Product/View.php(73): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#5 /home/mellimello/public_html/app/code/core/Mage/Catalog/Helper/Product/View.php(144): Mage_Catalog_Helper_Product_View->initProductLayout(Object(Mage_Catalog_Model_Product), Object(Mage_Catalog_ProductController))
#6 /home/mellimello/public_html/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(6, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#7 /home/mellimello/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#8 /home/mellimello/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#9 /home/mellimello/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/mellimello/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/mellimello/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#12 /home/mellimello/public_html/index.php(87): Mage::run('', 'store')
#13 {main}
It looks like the module Magentothem Upsellslider is broken. If you installed the module from somewhere else, contact the creator and tell them it isn't working. In the meantime, uninstall it by removing the file app/code/etc/modules/Magentothem_Upsellslider.xml and clear your cache.
If this is your module, you seem to be trying to call a non-existent function addJqueryLibrary in your observer. Perhaps you have a typo... should it be addJQueryLibrary?

How do I configure Laravel for Elastic Beanstalk?

I've got the instance going and everything but my config doesn't work and I don't what to try to make it work.
All I get are 503 errors and no explanation.
Production mode config
return array(
'url' => 'http://patientdueling.com',
'asset_url' => '',
'profiler' => false,
'ssl' => false,
);
When I switched from a dedicated server I could control to Elastic Beanstalk server and RDS with AWS for some reason my environment of production vs development was no longer being detected.
I copied my production config into laravel's default config and it worked!
My error:
exception 'ErrorException' with message 'PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/lib/mysql/mysql.sock)' in /var/www/html/laravel/database/connectors/mysql.php:33
Stack trace:
#0 /var/www/html/laravel/laravel.php(42): Laravel\Error::native(2, 'PDO::__construc...', '/var/www/html/l...', 33)
#1 [internal function]: Laravel\{closure}(2, 'PDO::__construc...', '/var/www/html/l...', 33, Array)
#2 /var/www/html/laravel/database/connectors/mysql.php(33): PDO->__construct('mysql:host=loca...', 'root', 'root', Array)
#3 /var/www/html/laravel/database.php(66): Laravel\Database\Connectors\MySQL->connect(Array)
#4 /var/www/html/laravel/database.php(52): Laravel\Database::connect(Array)
#5 /var/www/html/laravel/database/eloquent/query.php(255): Laravel\Database::connection(NULL)
#6 /var/www/html/laravel/database/eloquent/query.php(245): Laravel\Database\Eloquent\Query->connection()
#7 /var/www/html/laravel/database/eloquent/query.php(50): Laravel\Database\Eloquent\Query->table()
#8 /var/www/html/laravel/database/eloquent/model.php(473): Laravel\Database\Eloquent\Query->__construct(Object(System))
#9 /var/www/html/laravel/database/eloquent/model.php(789): Laravel\Database\Eloquent\Model->query()
#10 [internal function]: Laravel\Database\Eloquent\Model->__call('where_real_syst...', Array)
#11 [internal function]: System->where_real_system_id(0)
#12 /var/www/html/laravel/database/eloquent/model.php(804): call_user_func_array(Array, Array)
#13 /var/www/html/application/controllers/system.php(86): Laravel\Database\Eloquent\Model::__callStatic('where_real_syst...', Array)
#14 /var/www/html/application/controllers/system.php(86): System::where_real_system_id(0)
#15 [internal function]: System_Controller->get_list()
#16 /var/www/html/laravel/routing/controller.php(325): call_user_func_array(Array, Array)
#17 /var/www/html/laravel/routing/controller.php(285): Laravel\Routing\Controller->response('list', Array)
#18 /var/www/html/laravel/routing/controller.php(165): Laravel\Routing\Controller->execute('list', Array)
#19 /var/www/html/laravel/routing/route.php(153): Laravel\Routing\Controller::call('system#list', Array)
#20 /var/www/html/laravel/routing/route.php(124): Laravel\Routing\Route->response()
#21 /var/www/html/laravel/laravel.php(167): Laravel\Routing\Route->call()
#22 /var/www/html/public/index.php(34): require('/var/www/html/l...')
#23 {main}

Resources