laravel make observer for all models code example
Example 1: create observer in laravel
php artisan make:observer nameOfObserver --model=modelName
Example 2: laravel create observer
php artisan make:observer UserObserver --model=User
php artisan make:observer nameOfObserver --model=modelName
php artisan make:observer UserObserver --model=User