PHP code example of kletellier / mvc

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

    

kletellier / mvc example snippets


return $this->render(�Hello�)�;


$this->redirect(�routename�,array(��param��=>�value))�; // routename is a route name defined in routes.yml


return $this->render('index',array(��params��=>���value��))�;

return $this->renderHtmlTemplate('index',array(��params��=>���value��))�;
 console cache:clear

return $this->renderPHP('index.php',array(��params��=>���value��))�;
 $this->get('xls') // will give you PhpExcel Object ready to works 

namespace Application\Models;

use Illuminate\Database\Eloquent\Model;

class Test extends Model {
    protected $table = 'test';
    public $timestamps = false;
}


// retrieve all entries from test table 
$tests = Test::all()�;

// retrive only few entries
$test2 = Test::where('column','=','value')�;
app/Application/Models/Test.php