1. Go to this page and download the library: Download rawebone/view-model 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/ */
rawebone / view-model example snippets
namespace My\App\Views;
// src/My/App/Views/Model.php
use Rawebone\ViewModel\AbstractViewModel;
class Model extends AbstractViewModel
{
// Define your logic/constructors here
public function name()
{
return "John";
}
}
namespace My\Project\Views;
use Rawebone\ViewModel\AbstractViewModel;
class Model extends AbstractViewModel
{
/**
* @vmExpose
* @vmReturn string
* @vmExample JOHN
*/
public $upper;
/**
* @vmExpose
* @vmReturn string
* @vmExample John
*/
public function name()
{
return "John";
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.