Skip to content

Commit

Permalink
Remove boilerplate code
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksmash committed Sep 27, 2020
1 parent af2f297 commit 11385e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
2 changes: 1 addition & 1 deletion src/Commands/FortifyUICommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public function handle()
FILE_APPEND
);

$this->comment('All done');
$this->comment('FortifyUI is now setup!');
}
}
30 changes: 0 additions & 30 deletions src/FortifyUIServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ class FortifyUIServiceProvider extends ServiceProvider
public function boot()
{
if ($this->app->runningInConsole()) {
// $this->publishes([
// __DIR__ . '/../config/fortify-ui.php' => config_path('fortify-ui.php'),
// ], 'config');

$this->publishes([
__DIR__ . '/../resources/views' => base_path('resources/views'),
], 'views');
Expand All @@ -22,35 +18,9 @@ public function boot()
__DIR__ . '/../app/Providers' => base_path('app/Providers'),
], 'provider');

// $migrationFileName = 'create_fortify_ui_table.php';
// if (! $this->migrationFileExists($migrationFileName)) {
// $this->publishes([
// __DIR__ . "/../database/migrations/{$migrationFileName}.stub" => database_path('migrations/' . date('Y_m_d_His', time()) . '_' . $migrationFileName),
// ], 'migrations');
// }

$this->commands([
FortifyUICommand::class,
]);
}

// $this->loadViewsFrom(__DIR__ . '/../resources/views', 'fortify-ui');
}

public function register()
{
// $this->mergeConfigFrom(__DIR__ . '/../config/fortify-ui.php', 'fortify-ui');
}

public static function migrationFileExists(string $migrationFileName): bool
{
$len = strlen($migrationFileName);
foreach (glob(database_path("migrations/*.php")) as $filename) {
if ((substr($filename, -$len) === $migrationFileName)) {
return true;
}
}

return false;
}
}

0 comments on commit 11385e2

Please sign in to comment.