Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to undefined method Illuminate\Validation\Rules\In::__set_state()

i tried every method to resolve this, like clear cache,composer update/install, but after php artisan config:cache, it appears again.

In config.php line 839:
Call to undefined method Illuminate\Validation\Rules\In::__set_state()

and whole page turns to blank page. In bootstrap/cache/config.php file it shows:

'environment' => 
    array (
      'form' => 
      array (
        'rules' => 
        array (
          'app_name' => 'required|string|max:50',
          'environment' => 'required|string|max:50',
          'environment_custom' => 'required_if:environment,other|max:50',
          'app_debug' => 
          array (
            0 => 'required',
            1 => 
            Illuminate\Validation\Rules\In::__set_state(array(
               'rule' => 'in',
               'values' => 
              array (
                0 => 'true',
                1 => 'false',
              ),
            )),
          ),
like image 266
Binod Bhandary Avatar asked Jan 24 '26 19:01

Binod Bhandary


1 Answers

I also got this error because instead of

"Illuminate\Validation\Rule"

I have put

"Illuminate\Contracts\Validation\Rule"

like image 88
Thushara Saman Avatar answered Jan 26 '26 09:01

Thushara Saman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!