MissingAppKeyException No application encryption key has been specified. code example

Example 1: RuntimeException: No application encryption key has been specified.

php artisan key:generate

Example 2: encryption key has not encrypted laravel

php artisan key:generate
php artisan serve

Example 3: Tests\Feature\BlogTest > user can delete post 162 Illuminate\Encryption\MissingAppKeyException No application encryption key has been specified.

Tests\Feature\BlogTest > user can delete post 162
   Illuminate\Encryption\MissingAppKeyException 

  No application encryption key has been specified.

php artisan key:generate --env=testing #

Tags:

Php Example