first commit
This commit is contained in:
20
app/helpers.php
Normal file
20
app/helpers.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use App\Models\UserNotification;
|
||||
|
||||
if (! function_exists('storeUserNotification')) {
|
||||
function storeUserNotification($userId, $title, $description = null, $category = null, $isAdmin = false, $targetId = null, $targetType = null, $status = 'success', $isRead = false)
|
||||
{
|
||||
return UserNotification::create([
|
||||
'user_id' => $userId,
|
||||
'title' => $title,
|
||||
'description' => $description,
|
||||
'category' => $category,
|
||||
'target_id' => $targetId,
|
||||
'target_type' => $targetType,
|
||||
'is_read' => $isRead,
|
||||
'is_admin' => $isAdmin,
|
||||
'status' => $status,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user