create laravel observer code example Example: laravel observer php artisan make:observer UserObserver --model=User