19 lines
348 B
PHP
19 lines
348 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace App\Service;
|
||
|
|
|
||
|
|
use Illuminate\Support\Facades\Route;
|
||
|
|
|
||
|
|
class ToolService
|
||
|
|
{
|
||
|
|
public static function isCurrentRoute(
|
||
|
|
string $routePath
|
||
|
|
)
|
||
|
|
{
|
||
|
|
$currentPath = Route::getCurrentRequest()->path();
|
||
|
|
$uri = ltrim(str_replace(env('APP_URL'), '', $routePath), '/');
|
||
|
|
|
||
|
|
return $currentPath == $uri;
|
||
|
|
}
|
||
|
|
}
|