send notification
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
<?php
|
||||
|
||||
use App\Events\EventType;
|
||||
use App\Models\System\Roles\Permission;
|
||||
use App\Models\System\Verification;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Psr7\Request as GuzzleRequest;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Stevebauman\Location\Facades\Location;
|
||||
use Symfony\Component\HttpFoundation\IpUtils;
|
||||
@@ -286,3 +289,10 @@ function cached(string $name, mixed $value, int $seconds = 60): mixed
|
||||
callback: fn () => is_callable($value) ? call_user_func($value) : $value
|
||||
);
|
||||
}
|
||||
|
||||
function view_loan_order_permission_id(): int
|
||||
{
|
||||
return Cache::rememberForever('view_loan_order_permission_id', function () {
|
||||
return Permission::query()->where('name', 'ViewLoanOrders')->first(['id', 'name'])->id;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user