⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.101
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Server Software:
Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
ebook.dev-unit.com
/
app
/
Providers
/
View File Name :
AppServiceProvider.php
<?php namespace App\Providers; use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Request; use Illuminate\Support\ServiceProvider; use Nikhiltester\Stylist\StylistServiceProvider; use Nwidart\Modules\LaravelModulesServiceProvider; use Jackiedo\DotenvEditor\DotenvEditorServiceProvider; use Validator; class AppServiceProvider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { $this->app->register(StylistServiceProvider::class); $this->app->register(LaravelModulesServiceProvider::class); if (! config('app.installed')) { $this->app->register(DotenvEditorServiceProvider::class); } } /** * Bootstrap any application services. * * @return void */ public function boot() { Validator::extend('alpha_num_dash_spaces', function ($attribute, $value) { // This will only accept alpha and spaces - /^[\pL\s]+$/u. // If you want to accept hyphens use: /^[\pL\s-]+$/u. return preg_match('/^[\w\s-]*$/', $value); }); Validator::extend('url_ext', function ($attribute, $value) { $allowEx=get_allowed_file_types(); $ext = pathinfo($value, PATHINFO_EXTENSION); if(in_array($ext,$allowEx) && $ext!=='epub'){ return true; } return false; }); Schema::defaultStringLength(191); if (Request::secure()) { URL::forceScheme('https'); } } }