PHP code example of juhlinus / kakunin

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

    

juhlinus / kakunin example snippets




namespace App\Http\Requests;

use Kakunin\Concerns\ValidatesInertiaInput;
use Illuminate\Foundation\Http\FormRequest;

class CustomFormRequest extends FormRequest
{
    use ValidatesInertiaInput;

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return false;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //
        ];
    }
}

'kakunin' => [
    'validation_key' => env('KAKUNIN_VALIDATION_KEY'),
],