sukohi/save-without-event

A Laravel package to prevent firing a specific event(s) of model when saving.
17
Install
composer require sukohi/save-without-event
Latest Version:1.0.0
License:MIT
Last Updated:Aug 1, 2017
Links: GitHub  ·  Packagist
Maintainer: Sukohi

SaveWithoutEvent

A Laravel package to prevent firing a specific event(s) of model when saving.

Installation

Execute composer command.

composer require sukohi/save-without-event:1.*

Preparation

In your model, set SaveWithoutEventTrait.

<?php

namespace App;
use Sukohi\SaveWithoutEvent\SaveWithoutEventTrait;

class User {

    use SaveWithoutEventTrait;

That's all. Now you can use saveWithoutEvent method.

Usage

Use saveWithoutEvent() instead of save() like so.

$user = new \App\User;
// Something..
$user->saveWithoutEvent('saved');

// or with array

$user->saveWithoutEvent(['saving', 'saved']);
  • saveWithoutEvent() will return boolean result value as save() do.

License

This package is licensed under the MIT License.

Copyright 2017 Sukohi Kuhoh

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

622,487,850 9,703
laravel/framework

The Laravel Framework.

568,663,231 34,884
laravel/tinker

Powerful REPL for the Laravel framework.

478,440,860 7,440