Created
March 15, 2025 17:44
Boot laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Facades\URL; | |
use Illuminate\Http\Client\RequestException; | |
use Illuminate\Support\Facades\App; | |
use Monicah\Cloudflare\LaravelCloudflare; | |
use Monicah\Cloudflare\Facades\CloudflareProxies; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Register any application services. | |
*/ | |
public function register(): void | |
{ | |
// | |
} | |
/** | |
* Bootstrap any application services. | |
*/ | |
public function boot(): void | |
{ | |
Model::unguard(); | |
URL::forceScheme('https'); | |
LaravelCloudflare::getProxiesUsing(fn() => CloudflareProxies::load()); | |
if (App::environment('local')) { | |
RequestException::dontTruncate(); | |
} | |
} | |
} |
Author
lucenarenato
commented
Mar 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment