PHP code example of nkey / caribu-mvc-bootstrap

1. Go to this page and download the library: Download nkey/caribu-mvc-bootstrap 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/ */

    

nkey / caribu-mvc-bootstrap example snippets



namespace Nkey\Caribu\Mvc\Tests;

tController;
use Nkey\Caribu\Mvc\Application;

class BootstrapTestController extends AbstractController
{
    /**
     * @webMethod
     */
    public function index()
    {
        $this->response->addHeader('Last-modified', \DateTime::createFromFormat('U', filemtime(__FILE__))->format(\DateTime::RFC2822));

        echo '<div class="panel panel-default">';
        echo '<div class="panel-body">';
        echo '<h2>Hello Caribu Bootstrap!</h2>';
        echo '</div>';
        echo '</div>';
    }
}

Application::getInstance()->registerView('\Nkey\Caribu\Mvc\View\BootstrapView')
    ->registerController('\Nkey\Caribu\Mvc\Tests\BootstrapTestController')
    ->setDefaults('BootstrapTest');

Application::getInstance()->serve();