1. Go to this page and download the library: Download mjarestad/filtry 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/ */
mjarestad / filtry example snippets
use Mjarestad\Filtry\Http\Requests\Request;
class StorePostRequest extends Request
{
public function rules()
{
return [
'author' => '=> 'trim|replace:%,percent|slug',
];
}
}
class Post extends Eloquent {
public static $filters = array(
'author' => 'trim|ucwords',
'slug' => 'trim|replace:%,percent|slug'
);
public static $rules = array(
'author' => '