madbob/GASdottoNG

View on GitHub
code/app/Rules/Captcha.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace App\Rules;

use Illuminate\Contracts\Validation\Rule;

use Session;

class Captcha implements Rule
{
    public function passes($attribute, $value)
    {
        return trim($value) == Session::get('captcha_solution');
    }

    public function message()
    {
        return _i('Il codice di controllo รจ sbagliato');
    }
}