feat: Implement DNS management with dedicated models, repositories, requests, controllers, and services, while refactoring authentication by removing Passport and Sanctum.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Facades;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @method static string url(string $ip)
|
||||
*/
|
||||
class BaseHelperFacade extends Facade
|
||||
{
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return 'base-helper';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a base HTTPS URL from an IP address or hostname.
|
||||
*/
|
||||
public static function url(string $ip): string
|
||||
{
|
||||
$ip = rtrim($ip, '/');
|
||||
|
||||
if (!str_starts_with($ip, 'http://') && !str_starts_with($ip, 'https://')) {
|
||||
return 'https://' . $ip;
|
||||
}
|
||||
|
||||
return $ip;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user