PHP code example of tatter / files

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


 namespace App\Controller;

class WidgetFiles
{
	public function index($widgetId)
	{
		$this->setData([
			'format' => 'cards',
			'files'  => model(WidgetModel::class)->getFiles($widgetId),
			'layout' => 'manage',
		]);

		return $this->display();
	}
}

shell
php spark db:seed "Tatter\Files\Database\Seeds\FileSeeder"
shell
php spark publish