Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't figure out how to use pug-php/pug

I've installed https://github.com/pug-php/pug using composer and now I have a subdirectory vendor/pug-php/pug in my project but I can't figure out how to use it.

If I try

$pug = new Pug();

I obviously got

Class 'Pug' not found

How can I use it?

like image 339
Edo Avatar asked Oct 18 '22 02:10

Edo


1 Answers

If you installed pug with composer you should find an autoloader.php in your vendor folder.

This made it work:

use Pug\Pug;
include('vendor/autoload.php');
like image 99
marcus Avatar answered Oct 21 '22 15:10

marcus