Solving Uncaught ReflectionException: Class log does not exist in C:……Container.php:
I am experiencing an unexpected Reflection Exception error that class log does not exist. I am currently using Laravel 5.2. The addition of use log amongst namespaces into my controller hasn’t solved this.
Fatal error: Uncaught ReflectionException: Class log does not exist in C:xampphtdocslaravelvendorlaravelframeworksrcIlluminateContainerContainer.php:741 
Stack trace:
#0 C:xampphtdocslaravelvendorlaravelframeworksrcIlluminateContainerContainer.php(741): ReflectionClass->__construct('log')
#1 C:xampphtdocslaravelvendorlaravelframeworksrcIlluminateContainerContainer.php(631): IlluminateContainerContainer->build('log', Array) 
#2 C:xampphtdocslaravelvendorlaravelframeworksrcIlluminateFoundationApplication.php(674): IlluminateContainerContainer->make('log', Array) 
#3 C:xampphtdocslaravelvendorlaravelframeworksrcIlluminateContainerContainer.php(842): IlluminateFoundationApplication->make('log') 
#4 C:xampphtdocslaravelvendorlaravelframeworksrcIlluminateContainerContainer.php(805): IlluminateContainerContainer->resolveClass(Object(ReflectionParameter)) 
#5 C:xampphtdocslaravelvendorlaravelframeworksrcIlluminateContainerContainer.php(775): IlluminateConta in C:xampphtdocslaravelvendorlaravelframeworksrcIlluminateContainerContainer.php on line 741
controller.php
  <?php
namespace AppHttpControllers;
use Log;
use IlluminateFoundationBusDispatchesJobs;
use IlluminateRoutingController as BaseController;
use IlluminateFoundationValidationValidatesRequests;
use IlluminateFoundationAuthAccessAuthorizesRequests;
use IlluminateFoundationAuthAccessAuthorizesResources;
use IlluminateDatabaseEloquentModelNotFoundException;
 class Controller extends BaseController
{
    use AuthorizesRequests,AuthorizesResources, DispatchesJobs, ValidatesRequests;
}
routes.php
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
Route::get('/', function () {
    return view('welcome');
});
from Laravel Questions and Answers https://laravelquestions.com/laravel/solving-uncaught-reflectionexception-class-log-does-not-exist-in-c-container-php/
via Lzo Media
 
 
Thanks for the post. You have explained the topic in very simple and step by step with php expert
ReplyDelete