| 1234567891011121314151617181920212223 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- use App\Traits\LogModelChanging;
- use Illuminate\Database\Eloquent\Relations\BelongsToMany;
- class MailEvent extends Model
- {
- use LogModelChanging;
- protected $fillable = ['name', 'event_name', 'remark', 'is_active', 'template'];
- /**
- * @return BelongsToMany
- */
- public function roles(): BelongsToMany
- {
- return $this->belongsToMany(Role::class,'mail_event_role','mail_event_id','role_id');
- }
- }
|