Closed Docsconsole closed 5 years ago
If you're installing this library through Composer (i.e. composer require
), then Composer will handle the autoloading for you and there's no need to manually require the Autoloader provided by this library. You just need to use the autoloader provided by Composer, and if you're using Laravel, that should already be taken care of for you.
If you're installing this library through Composer (i.e.
composer require
), then Composer will handle the autoloading for you and there's no need to manually require the Autoloader provided by this library. You just need to use the autoloader provided by Composer, and if you're using Laravel, that should already be taken care of for you.
hi, i have added below given code snippet in the controller.
$hl = new Highlight\Highlighter();
But it is giving below given error. can you please let me know where is the mistake.
Class 'App\Http\Controllers\Highlight\Highlighter' not found
Guess I should correct the README slightly. Take a look at what namespaces are in PHP.
The example in the README should be:
$hl = new \Highlight\Highlighter();
That error is basically saying that there’s no Highlighter class in your Laravel path because it actually exists in the Highlight path.
hi Scrivo,
I have installed the highlight project in my Laravel project by using Composer. Added below given snippet into the controller.
When i am running the code then it is displaying with below error message.
App\Http\Controllers\AController::show(): Failed opening required '../Highlight/Autoloader.php' (include_path='.;C:\php\pear')
Can you please help me here.