Last active
October 29, 2017 13:59
-
-
Save iboved/cb3da7e2403defdbf4fb1f72d68a011f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Some\Namespace\Models; | |
use Model; | |
use Vitae\Account\Traits\ModelTrait; | |
/** | |
* Product Model | |
*/ | |
class Product extends Model | |
{ | |
use ModelTrait { | |
ModelTrait::beforeSave as traitBeforeSave; | |
} | |
public function beforeSave() | |
{ | |
// Some logic here | |
// Call beforeSave() method in the trait | |
$this->traitBeforeSave(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment