BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
www
/
app.imagivibe.com
/
vendor
/
spatie
/
laravel-package-tools
/
src
/
Commands
/
Concerns
📤 Upload
📝 New File
📁 New Folder
Close
Editing: AskToStarRepoOnGitHub.php
<?php namespace Spatie\LaravelPackageTools\Commands\Concerns; trait AskToStarRepoOnGitHub { protected ?string $starRepo = null; public function askToStarRepoOnGitHub($vendorSlashRepoName): self { $this->starRepo = $vendorSlashRepoName; return $this; } protected function processStarRepo(): self { if ($this->starRepo) { if ($this->confirm('Would you like to star our repo on GitHub?')) { $repoUrl = "https://github.com/{$this->starRepo}"; if (PHP_OS_FAMILY == 'Darwin') { exec("open {$repoUrl}"); } if (PHP_OS_FAMILY == 'Windows') { exec("start {$repoUrl}"); } if (PHP_OS_FAMILY == 'Linux') { exec("xdg-open {$repoUrl}"); } } } return $this; } }
Save
Cancel