laravel Eloquent model update event is not fired : <p>Merry Christmas guys!</p>

<p>I am new to Laravel. Just had a beginner's question, when I am trying to use service provider and model event to log the update information.</p>

<p>Was following the online doc: <a href="https://laravel.com/docs/5.3/eloquent#events" rel="noreferrer">https://laravel.com/docs/5.3/eloquent#events</a></p>

<p>After put all code together, I find that the model event only fire when create the use but never log anything when I edit the user. </p>

<p>Did I miss anything? Feel like the $user didn't get assigned properly. Where is it from? from other service provider?  </p>

<p>Any explanation or hint will be appreciated!</p>

<pre><code>&lt;?php

namespace App\Providers;

use App\User;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        User::creating(function ($user) {
            Log::info('event creating');
        });

        User::created(function ($user) {
            Log::info('event created');
        });

        User::updating(function ($user) {
            Log::info('event updating');
        });

        User::updated(function ($user) {
            Log::info('event updated');
        });

        User::saving(function ($user) {
            Log::info('event saving');
        });

        User::saved(function ($user) {
            Log::info('event saved');
        });

        User::deleting(function ($user) {
            Log::info('event deleting');
        });

        User::deleted(function ($user) {
            Log::info('event deleted');
        });
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
</code></pre>
