%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/app/Models/ |
Upload File : |
<?php
namespace App\Models;
/**
* App\Models\Notification
*
* @property int $id
* @property string $type
* @property string $notifiable_type
* @property int $notifiable_id
* @property string $data
* @property string|null $read_at
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read mixed $icon
* @method static \Illuminate\Database\Eloquent\Builder|Notification newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Notification newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Notification query()
* @method static \Illuminate\Database\Eloquent\Builder|Notification whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Notification whereData($value)
* @method static \Illuminate\Database\Eloquent\Builder|Notification whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Notification whereNotifiableId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Notification whereNotifiableType($value)
* @method static \Illuminate\Database\Eloquent\Builder|Notification whereReadAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Notification whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|Notification whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Notification extends BaseModel
{
public static function deleteNotification($notifyData, $id)
{
Notification::whereIn('type', $notifyData)
->whereNull('read_at')
->where('data', 'like', '{"id":' . $id . ',%')
->delete();
}
}