PHP code example of davidyell / statusable
1. Go to this page and download the library: Download davidyell/statusable 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/ */
davidyell / statusable example snippets
// Model/Example.php
public $actsAs = array(
'Statusable.Statusable' // If you want to configure the behaviour you can pass options in here
);
// Controller/ExampleController.php
public $components = array(
'Statusable.Statusable'
);
// Controller/ExampleController.php
$statuses = $this->Example->getStatuses();
// View/Example/edit.ctp
echo $this->Form->input('status_id');