Stevebauman\Inventory\Traits\InventoryTransactionHistoryTrait::bootInventoryTransactionHistoryTrait PHP Méthode

bootInventoryTransactionHistoryTrait() public static méthode

Make sure we try and assign the current user if enabled.
public static bootInventoryTransactionHistoryTrait ( ) : void
Résultat void
    public static function bootInventoryTransactionHistoryTrait()
    {
        static::creating(function (Model $model) {
            $model->setAttribute('user_id', Helper::getCurrentUserId());
        });
    }