Closed SaintPeter closed 10 years ago
I had to include this in my /start/global.php:
require app_path().'/vendor/autoload.php';
This comes up in google search results, so just letting people know you don't have to do that. Just use the namespaces like so:
$parser = new \JBBCode\Parser();
$parser->addCodeDefinitionSet(new \JBBCode\DefaultCodeDefinitionSet());
I installed the (newly refreshed) v1.2.0 of JBBCode from packagist in my instance of Laravel via composer. It appeared to install correctly, but I am unable to instantiate the parser (or any other) of the classes in the JBBCode namespace.
My vendor/composer/autoload_namespaces.php file appears correct:
My instantiation in a controller is just:
I consistently get an error of "Class 'JBBCode\Parser' not found"
I don't appear to be doing anything else weird or wrong. Have you tested this against a Laravel install?