You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/app/CorePackages/Scopes/RelatedToVirtualActivity.php

28 lines
498 B

<?php
namespace App\CorePackages\Scopes;
use App\CorePackages\Scopes\VirtualActivityScope;
trait RelatedToVirtualActivity
{
/**
* The "booting" method of the model.
*
* @return void
*/
protected static function boot()
{
parent::boot();
static::addGlobalScope(new VirtualActivityScope);
static::creating(function($model) {
$model->business_id = request()->business_id;
$model->user_id = 116;
});
}
}