PHP code example of vespakoen / epi

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

    

vespakoen / epi example snippets


'Vespakoen\Epi\EpiServiceProvider',

'EpiController' => 'Vespakoen\Epi\Controllers\EpiController',



class ApiUsersController extends Controller {

	/**
	 * Create a new ApiUsersController instance.
	 *
	 * @param  Illuminate\Database\Eloquent\Model  $model
	 * @return void
	 */
	public function __construct(User $model)
	{
		// Epi will look for $this->model, so make sure it is set like this.
		$this->model = $model;
	}

	/**
	 * $eagerLoad Relations to eagerload by default
	 *
	 * @var array
	 */
	public $eagerLoad = array();

	/**
	 * $indexRules Validation rules used when getting a list of resources
	 *
	 * @var array
	 */
	public $indexRules = array();

	/**
	 * $storeRules Validation rules used when storing a resource
	 *
	 * @var array
	 */
	public $storeRules = array(
		'email' => '

Route::resource('api/users', 'ApiUsersController');
shell
php artisan config:publish vespakoen/epi