team invitation notification with broadcasting

This commit is contained in:
Čarodej
2022-03-10 16:23:13 +01:00
parent 64e80d387b
commit 9ae2d54a5e
50 changed files with 331 additions and 201 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
<?php
namespace Support\Middleware;
use Closure;
@@ -16,7 +15,7 @@ class AdminCheck
public function handle($request, Closure $next)
{
// Check if user have access to administration settings
if ( $request->user()->role !== 'admin') {
if ($request->user()->role !== 'admin') {
abort(403, 'You don\'t have access for this operation!');
}
+1 -1
View File
@@ -1,8 +1,8 @@
<?php
namespace Support\Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
class TrustProxies extends Middleware
{
+9 -4
View File
@@ -27,9 +27,13 @@ if (! function_exists('getListOfLatestLogs')) {
return array_slice(
array_reverse(
array_filter(
scandir(storage_path() . '/logs'), fn($fn) => !str_starts_with($fn, '.')
scandir(storage_path() . '/logs'),
fn ($fn) => ! str_starts_with($fn, '.')
)
), 0, 5, true
),
0,
5,
true
);
}
}
@@ -687,6 +691,7 @@ if (! function_exists('mapTrafficRecords')) {
$records->add($record);
}
}
return $records;
}
}
@@ -1126,13 +1131,13 @@ if (! function_exists('replace_occurrence')) {
}
}
if (!function_exists('formatGPSCoordinates')) {
if (! function_exists('formatGPSCoordinates')) {
/**
* Format GPS coordinates
*/
function formatGPSCoordinates($coordinates, $ref): string|null
{
if (!$coordinates && !$ref) {
if (! $coordinates && ! $ref) {
return null;
}