Skip to content

Commit 84b006d

Browse files
Add welcome command to post-create-project-cmd
1 parent 4464279 commit 84b006d

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

app/Console/Commands/Welcome.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace App\Console\Commands;
6+
7+
use Illuminate\Console\Command;
8+
9+
final class Welcome extends Command
10+
{
11+
protected $signature = 'app:welcome';
12+
13+
protected $description = 'Scaffold a new Laravel SaaS project the Larament way.';
14+
15+
public function handle(): void
16+
{
17+
$orangeColor = "\x1b[33m";
18+
$resetColor = "\x1b[0m";
19+
20+
$this->line($orangeColor.'██╗ █████╗ ██████╗ █████╗ ███╗ ███╗███████╗███╗ ███╗████████╗'.$resetColor);
21+
$this->line($orangeColor.'██║ ██╔══██╗██╔══██╗ ██╔══██╗████╗ ████║██╔════╝████╗ ████║╚══██╔══╝'.$resetColor);
22+
$this->line($orangeColor.'██║ ███████║██████╔╝ ███████║██╔████╔██║█████╗ ██╔████╔██║ ██║ '.$resetColor);
23+
$this->line($orangeColor.'██║ ██╔══██║██╔══██╗ ██╔══██║██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║ ██║ '.$resetColor);
24+
$this->line($orangeColor.'███████╗██║ ██║██║ ██║ ██║ ██║██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║ ██║ '.$resetColor);
25+
$this->line($orangeColor.'╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ '.$resetColor);
26+
}
27+
}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
5757
],
5858
"post-create-project-cmd": [
59+
"@php artisan app:welcome",
5960
"@php artisan key:generate --ansi",
6061
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
6162
"@php artisan migrate --graceful --ansi",

0 commit comments

Comments
 (0)