Fatal error: Uncaught ReflectionException: Class config does not exist - php

I'm working on an e-commerce project on Laravel 5.8, but since I accidently ran "laravel new" command on the project's folder I get this error when I'm trying to launch the project on a local server:
Fatal error: Uncaught ReflectionException: Class config does not exist in C:\wamp64\www\e-commerce\vendor\laravel\framework\src\Illuminate\Container\Container.php:788
Stack trace:
0 C:\wamp64\www\e-commerce\vendor\laravel\framework\src\Illuminate\Container\Container.php(788): ReflectionClass->__construct('config')
1 C:\wamp64\www\e-commerce\vendor\laravel\framework\src\Illuminate\Container\Container.php(667): Illuminate\Container\Container->build('config')
2 C:\wamp64\www\e-commerce\vendor\laravel\framework\src\Illuminate\Container\Container.php(615): Illuminate\Container\Container->resolve('config', Array)
3 C:\wamp64\www\e-commerce\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(767): Illuminate\Container\Container->make('config', Array)
4 C:\wamp64\www\e-commerce\vendor\laravel\framework\src\Illuminate\Container\Container.php(1227): Illuminate\Foundation\Application->make('config')
5 C:\wamp64\www\e-commerce\vendor\laravel\framework\src\Illuminate\Log\LogManager.php(417): Illuminate\Container\C in C:\wamp64\www\e-commerce\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 788"
The error on line 788 refers to that portion of code:
$reflector = new ReflectionClass($concrete)
This happened after I cloned my repo from Github. Now for every project that I try to run on a local server I get this error.
I tried "composer install", "composer update", "composer dump-autoload" but they all give the same error with this line at the end:
"Script #php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255".
I checked the .env file to see if there was a namespace issue too, but there's none of it.
Thank you in advance for your help.

Try to remove de files in:
cd bootstrap/cache/
rm -rf *.php
In this directory are the file that initializes the structure, cache directory that contains structure-generated files for performance optimization, such as files and route cache services.

You may check the following items
Check whether your APP_NAME has space. If space is there, use it in quotes.
Delete everything from bootstrap/cache/ folder.
run composer dump-autoload
Hope it will work

I tried #gulCunha 's answer and it worked.
After that, you have to run composer update in order to create a new composer.lock and php artisan config:cache after that and you should be good to go.

Did you change the .env file,mistakenly I have added a "APP_NAME=aaa aa " with spaces, then checked every where, after that APP_NAME= changed without spaces, now working charm.

I was creating a new Laravel 9 project with composer and got the same error.
Fatal error: Uncaught ReflectionException: Class "config" does not exist in .../vendor/laravel/framework/src/Illuminate/Container/Container.php:875
Stack trace:
#0 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(875): ReflectionClass->__construct('config')
#1 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(756): Illuminate\Container\Container->build('config')
#2 .../vendor/laravel/framework/src/Illuminate/Foundation/Application.php(855): Illuminate\Container\Container->resolve('config', Array, true)
#3 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(692): Illuminate\Foundation\Application->resolve('config', Array)
#4 .../vendor/laravel/framework/src/Illuminate/Foundation/Application.php(840): Illuminate\Container\Container->make('config', Array)
#5 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(1415): Illuminate\Foundation\Application->make('config')
#6 .../vendor/laravel/framework/src/Illuminate/Log/LogManager.php(515): Illuminate\Container\Container->offsetGet('config')
#7 .../vendor/laravel/framework/src/Illuminate/Log/LogManager.php(566): Illuminate\Log\LogManager->getDefaultDriver()
#8 .../vendor/laravel/framework/src/Illuminate/Log/LogManager.php(119): Illuminate\Log\LogManager->parseDriver(NULL)
#9 .../vendor/laravel/framework/src/Illuminate/Log/LogManager.php(702): Illuminate\Log\LogManager->driver()
#10 .../vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(274): Illuminate\Log\LogManager->log('error', 'substr(): Argum...', Array)
#11 .../vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(367): Illuminate\Foundation\Exceptions\Handler->report(Object(TypeError))
#12 .../vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException(Object(TypeError))
#13 .../artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 {main}
Next Illuminate\Contracts\Container\BindingResolutionException: Target class [config] does not exist. in .../vendor/laravel/framework/src/Illuminate/Container/Container.php:877
Stack trace:
#0 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(756): Illuminate\Container\Container->build('config')
#1 .../vendor/laravel/framework/src/Illuminate/Foundation/Application.php(855): Illuminate\Container\Container->resolve('config', Array, true)
#2 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(692): Illuminate\Foundation\Application->resolve('config', Array)
#3 .../vendor/laravel/framework/src/Illuminate/Foundation/Application.php(840): Illuminate\Container\Container->make('config', Array)
#4 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(1415): Illuminate\Foundation\Application->make('config')
#5 .../vendor/laravel/framework/src/Illuminate/Log/LogManager.php(515): Illuminate\Container\Container->offsetGet('config')
#6 .../vendor/laravel/framework/src/Illuminate/Log/LogManager.php(566): Illuminate\Log\LogManager->getDefaultDriver()
#7 .../vendor/laravel/framework/src/Illuminate/Log/LogManager.php(119): Illuminate\Log\LogManager->parseDriver(NULL)
#8 .../vendor/laravel/framework/src/Illuminate/Log/LogManager.php(702): Illuminate\Log\LogManager->driver()
#9 .../vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(274): Illuminate\Log\LogManager->log('error', 'substr(): Argum...', Array)
#10 .../vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(367): Illuminate\Foundation\Exceptions\Handler->report(Object(TypeError))
#11 .../vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException(Object(TypeError))
#12 .../artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 {main}
thrown in .../vendor/laravel/framework/src/Illuminate/Container/Container.php on line 877
Script #php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
But this time it was not about the cache. Regardless of what the errors suggest, the problem was actually caused by the following lines found in vendor/vlucas/phpdotenv/src/Util/Str.php
$converted = $encoding === null ?
#\mb_convert_encoding($input, 'UTF-8') :
#\mb_convert_encoding($input, 'UTF-8', $encoding);
It actually occurred as I didn't have Multibyte String enabled when I built my PHP binaries. After rebuilding PHP with --enable-mbstring, the problem went away.

Make sure your .env file is the exact same as in your local environment. Make sure that the values on your .env file don't have spaces. Those that have spaces should be wrapped in quotes

I had a similar problem. Here is how I fixed it.
It started when I installed Toastr in my config/app.php providers.
I had failed to add the trailing ",".
Hence the problem.
Solution:
Check the last package you installed.
Check if you have added it correctly in the service providers.

You should run 'composer update' command, and then 'php artisan optimize' to clear the config cache and routes.

Related

Class Wikibase\DataModel\Entity\ItemId not found WikiBase installation

I am currently trying to follow this tutorial: https://www.mediawiki.org/wiki/Wikibase/Installation
I have the latest version of both MediaWiki and WikiBase (1.35) I'm currently trying to run the maintenance scripts.
I have installed both Wikibase Repository and Wikibase Client.
When I try to run "php maintenance/update.php" it gives me this error:
Error from line 47 of /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/lib/WikibaseLib.entitytypes.php: Class "Wikibase\DataModel\Entity\ItemId" not found
#0 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(695): require()
#1 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(410): Wikibase\Repo\WikibaseRepo::getDefaultEntityTypes()
#2 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/WikibaseRepo.php(460): Wikibase\Repo\WikibaseRepo::newInstance()
#3 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/extensions/Wikibase/repo/includes/RepoHooks.php(115): Wikibase\Repo\WikibaseRepo::getDefaultInstance()
#4 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookContainer.php(321): Wikibase\Repo\RepoHooks::onSetupAfterCache()
#5 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookContainer.php(132): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#6 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/HookContainer/HookRunner.php(3417): MediaWiki\HookContainer\HookContainer->run(string, array)
#7 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/Setup.php(694): MediaWiki\HookContainer\HookRunner->onSetupAfterCache()
#8 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/includes/WebStart.php(89): require_once(string)
#9 /Applications/XAMPP/xamppfiles/htdocs/mywikiname/index.php(44): require(string)
#10 {main}
How can I fix this? I've tried updating Composer and reinstalling it numerous times. If anyone can help, that would be great! :)
I hit the same error, and in my case, it was because my compose.local.json, (copied from composer.local.json-sample,) was pointing to "extensions/example/composer.json" rather than "extensions/Wikibase/composer.json". Fixing this to Wikibase, deleting composer.lock, running composer install --no-dev again, and finally running update.php fixed the issue.

Target class [view] does not exist. in Container.php

I have a problem with laravel and I don't know how to fix it for now. Actually I don't know how I face this problem, but will try to explain you what I did and what I tried for now to fix the problem.
I tried composer update and this problem occured.
Now I can not type any command like php artisan make:livewire name or even php artisan --version, everytime when I try to execute commands I receive this error in console
In Container.php line 811:
Target class [view] does not exist.
In Container.php line 809:
Class view does not exist
Script #php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Also the information from the log file
[previous exception] [object] (ReflectionException(code: -1): Class view does not exist at /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php:809)
[stacktrace]
#0 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(809): ReflectionClass->__construct()
#1 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\\Container\\Container->build()
#2 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\\Container\\Container->resolve()
#3 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(637): Illuminate\\Foundation\\Application->resolve()
#4 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\\Container\\Container->make()
#5 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(1284): Illuminate\\Foundation\\Application->make()
#6 /var/www/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(198): Illuminate\\Container\\Container->offsetGet()
#7 /var/www/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(166): Illuminate\\Support\\Facades\\Facade::resolveFacadeInstance()
#8 /var/www/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(255): Illuminate\\Support\\Facades\\Facade::getFacadeRoot()
#9 /var/www/vendor/beyondcode/helo-laravel/src/HeloLaravelServiceProvider.php(41): Illuminate\\Support\\Facades\\Facade::__callStatic()
#10 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(627): BeyondCode\\HeloLaravel\\HeloLaravelServiceProvider->register()
#11 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register()
#12 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(604): Illuminate\\Foundation\\ProviderRepository->load()
#13 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#14 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(230): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap()
#15 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\\Foundation\\Application->bootstrapWith()
#16 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): Illuminate\\Foundation\\Console\\Kernel->bootstrap()
#17 /var/www/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle()
#18 {main}
"}
Solutions I have been tried till now:
1.Delete vendor folder and type composer install again but at the final stage I received this error again.
2.Delete vendor and composer.lock still without success.
3.Cleaned boostrap/cache/*.php folder and run commands again, but it not worked again.
So any advice how to fix this problem will be appreciated.
Laravel Version: 7
The whole problem was that, another developer had commented line
Illuminate\View\ViewServiceProvider::class, inside config/app.php providers
For me this error occurred after having executed php artisan optimize:clear.
All I had to do to fix it was to execute php artisan view:cache
I solve this problem in my app (Laravel 8, php 7.4 online server) following the steps below:
access my server over ssh
execute this command for the installer composer:
curl -sS https://getcomposer.org/installer | php
change the name of composer.phar for composer. Follow the stpes below:
mkdir ~/bin
mv ~/composer.phar ~/bin/composer
now execute this command for apache PHP
export PATH=$PATH:/var/www/bin
echo 'export PATH=$PATH:/var/www/bin' >> ~/.bashrc
Now test using the command
composer about
Perfect! Now do you need delete your folder VENDOR, and run the command below :
composer update
Voila! try access you application again
One can also run composer install and it could also fix some versions of this error.

500 Error with laravel when creating a new project

I try to learn laravel and after creating a project with.
i created a new project by typing "laravel new projectname" in cmd, installing composer and node.js, changed in cmd to the project directory and installed composer there and tryed to run "php artisan serve" comand. i got the message "Laravel development server started: http://127.0.0.1:8000"
when i open http://127.0.0.1:8000 i get a 500 Error (not from the browser. the error is from laravel).
I have absolutly no idea what could be wrong. I went by 3 guides for starters and they did not have this problem.
Is there anything i can do ti fix this error?
thank you very much in advance
edit: here is the logfile from storage/logs
[2019-10-12 20:13:12] production.ERROR: No application encryption key has been specified. {"exception":"[object] (RuntimeException(code: 0): No application encryption key has been specified. at C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Encryption\\EncryptionServiceProvider.php:44)
[stacktrace]
#0 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\helpers.php(424): Illuminate\\Encryption\\EncryptionServiceProvider->Illuminate\\Encryption\\{closure}(NULL)
#1 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Encryption\\EncryptionServiceProvider.php(48): tap(NULL, Object(Closure))
#2 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Encryption\\EncryptionServiceProvider.php(24): Illuminate\\Encryption\\EncryptionServiceProvider->key(Array)
#3 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(800): Illuminate\\Encryption\\EncryptionServiceProvider->Illuminate\\Encryption\\{closure}(Object(Illuminate\\Foundation\\Application), Array)
#4 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(682): Illuminate\\Container\\Container->build(Object(Closure))
#5 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(630): Illuminate\\Container\\Container->resolve('encrypter', Array)
#6 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(768): Illuminate\\Container\\Container->make('encrypter', Array)
#7 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(946): Illuminate\\Foundation\\Application->make('encrypter')
#8 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(874): Illuminate\\Container\\Container->resolveClass(Object(ReflectionParameter))
#9 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(835): Illuminate\\Container\\Container->resolveDependencies(Array)
#10 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(682): Illuminate\\Container\\Container->build('App\\\\Http\\\\Middle...')
#11 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(630): Illuminate\\Container\\Container->resolve('App\\\\Http\\\\Middle...', Array)
#12 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(768): Illuminate\\Container\\Container->make('App\\\\Http\\\\Middle...', Array)
#13 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(215): Illuminate\\Foundation\\Application->make('App\\\\Http\\\\Middle...')
#14 C:\\Users\\Rjinxil\\testproject\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(189): Illuminate\\Foundation\\Http\\Kernel->terminateMiddleware(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))
#15 C:\\Users\\Rjinxil\\testproject\\public\\index.php(60): Illuminate\\Foundation\\Http\\Kernel->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))
#16 C:\\Users\\Rjinxil\\testproject\\server.php(21): require_once('C:\\\\Users\\\\Rjinxi...')
#17 {main}
"}
So close your terminal session and run this command in your CMD:
php artisan key:generate
in the project folder. Make sure you have .env file created. Then serve your application once again.
Try Below steps :
php artisan config:cache
php artisan cache:clear
php artisan key:generate

Laravel Excel Installation

I've just used composer to get Maatwebsite Laravel-Excel. I am about to use it but I am brand new to installing/using packages. So far I've only used what is shipped with Laravel.
I'm reading the documentation and am following the steps (I've done the first three steps) but I am confused by this line;
The class is binded to the ioC as excel
$excel = App::make('excel');
I don't really know what most of that means. I have read up a little on ioC and then Dependency Injection (also new to me). But I still don't know - is this part of the docs telling me to do something?? I ran php artisan on the command line (for another purpose) and I got this back;
[2015-04-23 13:42:09] local.ERROR: exception 'BadMethodCallException' with message 'Call to undefined method [package]' in /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php:226
Stack trace:
#0 /vagrant/source/laravel-excel/vendor/maatwebsite/excel/src/Maatwebsite/Excel/ExcelServiceProvider.php(45): Illuminate\Support\ServiceProvider->__call('package', Array)
#1 /vagrant/source/laravel-excel/vendor/maatwebsite/excel/src/Maatwebsite/Excel/ExcelServiceProvider.php(45): Maatwebsite\Excel\ExcelServiceProvider->package('maatwebsite/exc...')
#2 [internal function]: Maatwebsite\Excel\ExcelServiceProvider->boot()
#3 /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Container/Container.php(523): call_user_func_array(Array, Array)
#4 /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(703): Illuminate\Container\Container->call(Array)
#5 /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(685): Illuminate\Foundation\Application->bootProvider(Object(Maatwebsite\Excel\ExcelServiceProvider))
#6 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(Maatwebsite\Excel\ExcelServiceProvider), 19)
#7 /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(686): array_walk(Array, Object(Closure))
#8 /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(15): Illuminate\Foundation\Application->boot()
#9 /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(181): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#10 /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(195): Illuminate\Foundation\Application->bootstrapWith(Array)
#11 /vagrant/source/laravel-excel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(92): Illuminate\Foundation\Console\Kernel->bootstrap()
#12 /vagrant/source/laravel-excel/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 {main}
php artisan ran sucessfully when I took out the maatwebsite references in config/app.php - so there must be more to do here but I don't know what.
Looks like the documentation is listing the wrong version. The 1.x branch is meant for Laravel 4.x. The GitHub page provides a better guide for Laravel 5 users. Try changing the version to 2.* in your composer.json and re-run composer update. Add the correct references back to your app.php you should be able to run php artisan without errors.
The App::make('excel') command should also work after that.

Laravel white Screen of Death on Errors with proper permissions

I'm setting my first project using Laravel, but it has been a big deal to show application errors.
It just works fine when everything is correct, but if there is any kind of errors, I get the white screen.
The app/storage folder is set to 777 (I know it shouldn't) and debug is true.
Nginx error log complains about a missing view/layout.html.php, which I think that has to do with the error view generation.
I'm working at homestead VM provoded in Laravel's website. I've created the project with composer and with laravel.phar boot from the VM and from host machine and I get the same situation.
This is artisan tail log:
#3 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8943): Illuminate\Exception\WhoopsDisplayer->display(Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#4 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8895): Illuminate\Exception\Handler->displayException(Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#5 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(692): Illuminate\Exception\Handler->handleException(Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#6 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(7425): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#7 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8031): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#8 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(7978): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#9 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(10747): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#10 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(648): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#11 /home/vagrant/Code/Laravel/public/fazendafarao/public/index.php(49): Illuminate\Foundation\Application->run()
#12 {main} [] []
[2014-06-10 13:54:17] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Uncaught exception 'RuntimeException' with message 'Could not find resource 'views/layout.html.php' in any resource paths.(searched: /home/vagrant/Code/Laravel/public/fazendafarao/vendor/laravel/framework/src/Illuminate/Exception/resources, /var/www/working/laravel-master/vendor/filp/whoops/src/Whoops/Handler/../Resources)' in /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php:10631
Stack trace:
#0 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(10513): Whoops\Handler\PrettyPageHandler->getResource('views/layout.ht...')
#1 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(10361): Whoops\Handler\PrettyPageHandler->handle(Object(RuntimeException))
#2 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8837): Whoops\Run->handleException(Object(RuntimeException))
#3 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8943): Illuminate\Exception\WhoopsDisplayer->display(Object(RuntimeException))
#4 /home/vagrant/Code/L' in /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php:10631
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []
Does someone have a clue?
I finally got it. Installing with "laravel new" as in http://laravel.com/docs/quick#installation caused some issues on dependencies. But it worked installing with composer.
I found that running php artisan optimize fixed my issue (Laravel 4.2)

Categories