Download src/app/Models/Notification.php from pnacorp/xsender: direct link, hf CLI and curl.
- Browser
- Download file 488 Bytes
-
https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Models/Notification.php
- Command line
-
hf download hf://pnacorp/xsender/src/app/Models/Notification.php
-
curl -L -o Notification.php https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Models/Notification.php
488 Bytes
| namespace App\Models; | |
| use App\Enums\StatusEnum; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Database\Eloquent\Builder; | |
| use Illuminate\Database\Eloquent\Factories\HasFactory; | |
| class Notification extends Model | |
| { | |
| use HasFactory; | |
| protected $guarded = []; | |
| public function notificationable(){ | |
| return $this->morphTo(); | |
| } | |
| public function scopeUnread(Builder $q) :Builder { | |
| return $q->where("is_read",StatusEnum::FALSE->status()); | |
| } | |
| } | |