PHP code example of spajz / modval

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

    

spajz / modval example snippets


'Modval' => 'Spajz\Modval\Modval'

class Foo extends Modval {

}

class Foo extends Modval {
    protected static $rules = array(
        'title' => '

class Foo extends Modval {
    protected static $rules = array(
        'create' => array(
            'slug' => '      'title' => '

public function store()
{
    $foo = new Foo(Input::all());

    if ($foo->save()) return Redirect::route('foo.index');

    return Redirect::back()->withInput()->withErrors($foo->getErrors());
}
app/config/app.php