PHP code example of tatter / forms

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

    

tatter / forms example snippets


class HeroModel extends \CodeIgniter\Model
{
	public $name = 'superhero';
	...



namespace App\Controllers;

use App\Models\HeroModel;
use Tatter\Forms\Controllers\ResourcePresenter;

class Heroes extends ResourcePresenter
{	
	protected $modelName = HeroModel::class;
	...



namespace App\Controllers\API;

use App\Models\HeroModel;
use Tatter\Forms\Controllers\ResourceController;

class Heroes extends ResourceController
{	
	protected $modelName = HeroModel::class;
	protected $format    = 'json';
	...