3
respostas

erro no laravel com o banco mysql

este é meu erro alguém me ajude ai por favor.

RuntimeException in EncryptionServiceProvider.php line 29:
No supported encrypter found. The cipher and / or key length are invalid.
in EncryptionServiceProvider.php line 29
at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in Container.php line 738
at Container->build(object(Closure), array()) in Container.php line 631
at Container->make('encrypter', array()) in Application.php line 674
at Application->make('Illuminate\Contracts\Encryption\Encrypter') in Container.php line 842
at Container->resolveClass(object(ReflectionParameter)) in Container.php line 805
at Container->getDependencies(array(object(ReflectionParameter)), array()) in Container.php line 776
at Container->build('App\Http\Middleware\EncryptCookies', array()) in Container.php line 631
at Container->make('App\Http\Middleware\EncryptCookies', array()) in Application.php line 674
at Application->make('App\Http\Middleware\EncryptCookies') in Pipeline.php line 123
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 122
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
at Kernel->handle(object(Request)) in index.php line 54
at require_once('C:\Users\Mandrack\Desktop\estoque\public\index.php') in server.php line 21
3 respostas

Isael, tudo bem? tenta executar esse comando na raiz do seu projeto: php artisan key:generate

Seu erro não é relacionado ao banco diretamente, mas sim a estrategia de criptografia utilizada pelo Laravel para algumas coisas.

Abraço, bons estudos!

Certo meu amigo.

agora o erro mudou depois que fiz o que você pediu.

RuntimeException in EncryptionServiceProvider.php line 29: No supported encrypter found. The cipher and / or key length are invalid.

    in EncryptionServiceProvider.php line 29
    at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in Container.php line 738
    at Container->build(object(Closure), array()) in Container.php line 631
    at Container->make('encrypter', array()) in Application.php line 674
    at Application->make('Illuminate\Contracts\Encryption\Encrypter') in Container.php line 842
    at Container->resolveClass(object(ReflectionParameter)) in Container.php line 805
    at Container->getDependencies(array(object(ReflectionParameter)), array()) in Container.php line 776
    at Container->build('App\Http\Middleware\EncryptCookies', array()) in Container.php line 631
    at Container->make('App\Http\Middleware\EncryptCookies', array()) in Application.php line 674
    at Application->make('App\Http\Middleware\EncryptCookies') in Pipeline.php line 123
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
    at CheckForMaintenanceMode->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
    at Pipeline->then(object(Closure)) in Kernel.php line 122
    at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
    at Kernel->handle(object(Request)) in index.php line 54
    at require_once('C:\Users\Mandrack\Desktop\estoque\public\index.php') in server.php line 21

Isael, cola aqui seu config/app.php por favor?