public function creating(Model $model)
    {
        if (! $model->created_by) {
            $model->created_by = $this->getAuthenticatedUserId();
        }

        if (! $model->updated_by) {
            $model->updated_by = $this->getAuthenticatedUserId();
        }
    }
public function creating(Model $model)
    {
        if (! $model->created_by) {
            $model->created_by = $this->getAuthenticatedUserId();
        }

        if (! $model->updated_by) {
            $model->updated_by = $this->getAuthenticatedUserId();
        }
    }
public function creating ( Model $ model ) { if ( ! $ model -> created_by ) { $ model -> created_by = $ this -> getAuthenticatedUserId ( ) ; } if ( ! $ model -> updated_by ) { $ model -> updated_by = $ this -> getAuthenticatedUserId ( ) ; } }
Model's creating event hook.

@param Model $model
Model s creating event hook .