firstcommit

This commit is contained in:
2025-08-17 16:23:14 +05:45
commit 76bf4c0a18
2648 changed files with 362795 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class ResetRefreshDatabaseCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'db:reset';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Resets/Refresh the database(ie: dp wipe, migrate, seed)';
/**
* Execute the console command.
*/
public function handle()
{
//-- Wipe the database
$this->call('db:wipe');
//-- Migrate the database
$this->call('migrate');
//-- Seed the database
$this->call('db:seed');
//-- Clear Cache
$this->call('optimize:clear');
//-- Flush Session
// $this->call('session:flush');
return Command::SUCCESS;
}
}

27
app/Console/Kernel.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}