feat: Complete Woles Framework v1.0 with enterprise-grade UI
- Add comprehensive error handling system with custom error pages - Implement professional enterprise-style design with Tailwind CSS - Create modular HMVC architecture with clean separation of concerns - Add security features: CSRF protection, XSS filtering, Argon2ID hashing - Include CLI tools for development workflow - Add error reporting dashboard with system monitoring - Implement responsive design with consistent slate color scheme - Replace all emoji icons with professional SVG icons - Add comprehensive test suite with PHPUnit - Include database migrations and seeders - Add proper exception handling with fallback pages - Implement template engine with custom syntax support - Add helper functions and facades for clean code - Include proper logging and debugging capabilities
This commit is contained in:
48
app/Core/Database/Seeder.php
Normal file
48
app/Core/Database/Seeder.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Core\Database;
|
||||
|
||||
/**
|
||||
* NovaCore Database Seeder
|
||||
* Base seeder class
|
||||
*/
|
||||
abstract class Seeder
|
||||
{
|
||||
protected Connection $connection;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->connection = $this->getConnection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get database connection
|
||||
*/
|
||||
protected function getConnection(): Connection
|
||||
{
|
||||
$config = include __DIR__ . '/../../Config/database.php';
|
||||
$connectionConfig = $config['connections'][$config['default']];
|
||||
|
||||
return new Connection($connectionConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the seeder
|
||||
*/
|
||||
abstract public function run(): void;
|
||||
|
||||
/**
|
||||
* Call another seeder
|
||||
*/
|
||||
protected function call(string $seeder): void
|
||||
{
|
||||
$seederClass = "Database\\Seeders\\{$seeder}";
|
||||
|
||||
if (!class_exists($seederClass)) {
|
||||
throw new \Exception("Seeder class {$seederClass} not found");
|
||||
}
|
||||
|
||||
$seederInstance = new $seederClass();
|
||||
$seederInstance->run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user