Skip to content

Commit

Permalink
commit backup configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Raza9798 committed Jun 17, 2024
1 parent 81028c4 commit 8e88030
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Console/Commands/InitilizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ public function handle()
]);

(new BackupController())->configureDatabaseDump();

Artisan::call("rapid:support");
}
}
13 changes: 11 additions & 2 deletions src/Console/Commands/RapidKitSupportCommand.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?php

namespace App\Console\Commands;
namespace Intelrx\Rapidkit\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Intelrx\Rapidkit\assets\Banner;
use Intelrx\Rapidkit\Config\Config;

class RapidKitSupportCommand extends Command
{
Expand All @@ -25,6 +28,12 @@ class RapidKitSupportCommand extends Command
*/
public function handle()
{
$this->info('Welcome to Laravel Rapid Kit Support!');
(new Banner())->renderTitle('Welcome to Laravel Rapid Kit Support!');
(new Banner())->line("LARAVEL RAPID KIT " . Config::VERSION);

Artisan::call('list rapid');
$output = Artisan::output();
(new Banner())->log($output);

}
}
6 changes: 5 additions & 1 deletion src/RapidKitProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Intelrx\Rapidkit;

use App\Console\Commands\RapidKitSupportCommand;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\ServiceProvider;
use Intelrx\Rapidkit\Console\Commands\InitilizeCommand;
use Intelrx\Rapidkit\Console\Commands\ResourceGeneratorCommand;
use Intelrx\Rapidkit\Console\Commands\RapidKitSupportCommand;

class RapidKitProvider extends ServiceProvider
{
Expand All @@ -29,6 +29,10 @@ public function boot(): void
InitilizeCommand::class,
RapidKitSupportCommand::class,
]);

Artisan::call("rapid:install");
}


}
}
10 changes: 10 additions & 0 deletions src/assets/Banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,18 @@ public function log($message)
fwrite(STDERR, "\e[32m$message\e[0m\n");
}

public function warn($message)
{
fwrite(STDERR, "\e[33m$message\e[0m\n");
}

public function error($message)
{
fwrite(STDERR, "\e[31m$message\e[0m\n");
}

public function line($message)
{
fwrite(STDERR, "$message\n");
}
}
7 changes: 7 additions & 0 deletions src/config/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
namespace Intelrx\Rapidkit\Config;

class Config
{
const VERSION = '1.2';
}

0 comments on commit 8e88030

Please sign in to comment.