PHP code example of mouf / mvc.bce
1. Go to this page and download the library: Download mouf/mvc.bce 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/ */
mouf / mvc.bce example snippets
/**
* Edit a user
* @URL user/edit
* @param int $id : the id of the user to edit (null for adding a new user)
*/
public function addUser($id = null) {
$this->userFormInstance->load($id);//load the user into the form
...
}
/**
* Save a user
* @URL user/save
*/
public function saveUser() {
$this->userFormInstance->save();//save the user
...
}
$this->userFormInstance->toHtml();