Skip to content

Instantly share code, notes, and snippets.

@iboved
Last active October 29, 2017 13:59
Show Gist options
  • Save iboved/cb3da7e2403defdbf4fb1f72d68a011f to your computer and use it in GitHub Desktop.
Save iboved/cb3da7e2403defdbf4fb1f72d68a011f to your computer and use it in GitHub Desktop.
<?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