One Hat Cyber Team
Your IP :
3.144.29.148
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
food.electronharmony.com
/
app
/
Models
/
View File Name :
PushNotification.php
<?php namespace App\Models; use App\Models\Scopes\BranchScope; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; use Spatie\Permission\Models\Role; class PushNotification extends Model implements HasMedia { use HasFactory; use InteractsWithMedia; protected $table = "push_notifications"; protected $fillable = ['role_id', 'user_id', 'branch_id', 'title', 'description']; protected $casts = [ 'id' => 'integer', 'role_id' => 'integer', 'user_id' => 'integer', 'branch_id' => 'integer', 'title' => 'string', 'description' => 'string', ]; protected static function boot() { parent::boot(); static::addGlobalScope(new BranchScope()); } public function getImageAttribute() { if (!empty($this->getFirstMediaUrl('pushNotifications'))) { return asset($this->getFirstMediaUrl('pushNotifications')); } } public function role() { return $this->belongsTo(Role::class); } public function customer() { return $this->belongsTo(User::class, 'user_id', 'id'); } }