mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
feat: add announcement model with segments relationship.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
/**
|
||||
* Class Announcement
|
||||
* @package App\Models
|
||||
*
|
||||
*/
|
||||
class Announcement extends AbstractModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'announcements';
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
**/
|
||||
public function segments(): BelongsToMany
|
||||
{
|
||||
return $this->BelongsToMany(Segment::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user