Skip to content

Commit

Permalink
wip install command
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim-the-Diamond committed Mar 6, 2024
1 parent fb2f7fe commit e087cc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions config/builder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

return [];
14 changes: 10 additions & 4 deletions packages/builder/src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,19 @@ public function welcome(): void
public function publish_configuration(): void
{
if (confirm('Do you wish to publish the configuration?', true)) {
info('Publishing Builder Configuration...');
$this->callSilent('vendor:publish', ['--tag' => 'builder-config']);
if(!config()->has('builder')){
info('Publishing Builder Configuration...');
$this->callSilent('vendor:publish', ['--tag' => 'builder-config']);
}else{
warning('The Builder config already exist. The config will not be published.');
}
}
}

public function publish_migrations(): void
{
if (confirm('Do you wish to publish the mugrations?', true)) {
$confirmed = confirm('Do you wish to publish the migrations?', true);
if ($confirmed) {
if (Schema::hasTable('items')) {
warning('The items table already exists. The migrations will not be published.');
} elseif (confirm('Do you wish to publish the migrations?', true)) {
Expand All @@ -99,7 +104,8 @@ public function run_migrations(): void

public function register_plugins(): void
{
if (confirm('Do you wish to publish the configuration?', true)) {
$confirmed = confirm('Do you register the plugin?', true);
if ($confirmed) {
note('Registering the Filament Resources...');

$providerPath = app_path('Providers/Filament/AdminPanelProvider.php');
Expand Down

0 comments on commit e087cc4

Please sign in to comment.