-
app/Console/Commands/GithubLanguages.php
Open in GitHubuse Illuminate\Console\Command; class GithubLanguages extends Command { // public function handle(): void { $this->info('retrieve all languages from ozh/github-colors'); $languages = Http::get('https://raw.githubusercontent.com/ozh/github-colors/master/colors.json') ->collect() ->put('VimL', ['color' => null]) ->put('Arduino', ['color' => null]) ->put('Eagle', ['color' => null]) ->put('Nginx', ['color' => null]) ->map(fn (array $language, string $name): array => array_merge( $language, [ 'name' => $name, 'enum' => (string) Str::of($name) ->slug('_') ->upper(), ] )) // } }