PHP code example of bkwld / laravel-pug

1. Go to this page and download the library: Download bkwld/laravel-pug library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bkwld / laravel-pug example snippets


Route::get('/', function () {
    return view('my-page');
});

Route::get('/', function () {
    return view('my-page', [
        'user' => Auth::user(),
        'messages' => ['Hello', 'Bye'],
    ]);
});

$app->register(Bkwld\LaravelPug\ServiceProvider::class);

$router->get('/', function () use ($router) {
    // will render resources/views/test.pug
    return view('test', [
        'name' => 'Bob',
    ]);
});