mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
38 lines
793 B
PHP
38 lines
793 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Carbon\Carbon;//call to carbon to return the current time with a Carbon instance
|
|
|
|
class Announcement extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'start_date', 'end_date', 'content',
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for arrays.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $table = 'announcements';
|
|
|
|
|
|
// //call to get active announcements
|
|
// public function scopeActive($query)
|
|
// {
|
|
// return $query->where('start_date', '<=', Carbon::now())
|
|
// ->where('end_date', '>=', Carbon::now());
|
|
// }
|
|
}
|