mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
force scheme
This commit is contained in:
parent
6ad1c6abdb
commit
ea58fea444
1 changed files with 7 additions and 0 deletions
|
|
@ -17,6 +17,9 @@ class GenerateHtml extends Command
|
|||
|
||||
protected $description = 'Generate the static HTML.';
|
||||
|
||||
public Router $router;
|
||||
public UrlGenerator $url;
|
||||
|
||||
public function __construct(Router $router, UrlGenerator $url) {
|
||||
parent::__construct();
|
||||
|
||||
|
|
@ -30,6 +33,10 @@ class GenerateHtml extends Command
|
|||
|
||||
$this->url->forceRootUrl($this->argument('rootUrl'));
|
||||
|
||||
if (Str::startsWith($this->argument('rootUrl'), 'https')) {
|
||||
$this->url->forceScheme('https');
|
||||
}
|
||||
|
||||
File::copyDirectory(public_path(), $outdir);
|
||||
|
||||
collect($this->router->getRoutes()->get())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue