aurexengine/framework
Custom Chassis Framework (aurexengine/framework) is a Laravel/PHP framework package providing a chassis-style foundation for building applications and modules. Intended as a base layer for project structure, shared conventions, and core utilities.
Installation
composer require aurexengine/framework
composer.json for required PHP version (≥8.0) and Laravel version compatibility (Laravel 8+ recommended).php artisan vendor:publish --provider="AurexEngine\Framework\ServiceProvider"
Basic Setup
config/app.php under providers:
AurexEngine\Framework\ServiceProvider::class,
First Use Case: Middleware or Macro
use AurexEngine\Framework\Support\Str;
Str::macro('customMethod', function () {
return 'Modified!';
});
app/Http/Kernel.php:
protected $middleware = [
\AurexEngine\Framework\Http\Middleware\ExampleMiddleware::class,
];
Documentation
src/ for core classes (e.g., Support/, Http/, Console/).tests/ for usage examples.README.md or CHANGELOG.md if they exist).$this->app->bind(
\AurexEngine\Framework\Contracts\ExampleInterface::class,
\App\Services\CustomExample::class
);
collect([1, 2, 3])->aurexCustomMethod(); // Hypothetical macro
app/Console/Kernel.php:
protected $commands = [
\AurexEngine\Framework\Console\ExampleCommand::class,
];
php artisan aurex:example
Route::macro('aurexResource', function ($name, $controller) {
Route::resource($name, $controller);
// Additional logic...
});
Route::middleware(['aurex.auth', 'throttle:60'])->group(...);
Event::listen(
\AurexEngine\Framework\Events\ExampleEvent::class,
\App\Listeners\HandleExample::class
);
use AurexEngine\Framework\Models\BaseModel;
class User extends BaseModel { ... }
Blade::directive('aurex', function ($expression) {
return "<?php echo aurexFunction($expression); ?>";
});
$this->mock(\AurexEngine\Framework\Contracts\ExampleInterface::class);
No Official Docs
storage/logs/laravel.log for exceptions.src/ with Xdebug or dd().boot()).Version Compatibility
composer require laravel/framework:^9.0 --dev
Namespace Collisions
AurexEngine\Framework classes. Prefix custom classes:
namespace App\Extensions\Aurex;
Configuration Overrides
.env doesn’t conflict:
AUREX_FRAMEWORK_DEBUG=true
if (config('aurex.debug')) {
\AurexEngine\Framework\Support\Debug::log('Custom message');
}
php artisan tinker
>>> \AurexEngine\Framework\Facades\Example::testMethod();
AurexEngine\Framework\Helpers::foo()). Prefer facades or service container bindings to avoid tight coupling.Customizing Core Logic
use AurexEngine\Framework\Traits\ExampleTrait;
class CustomExample {
use ExampleTrait {
ExampleTrait::originalMethod as protected overrideMethod;
}
public function originalMethod() {
// Modify behavior
$this->overrideMethod();
}
}
Adding New Features
Console/Command).Performance
$value = Cache::remember('aurex_key', 3600, function () {
return \AurexEngine\Framework\HeavyOperation::run();
});
'Aurex' => \AurexEngine\Framework\Facades\ExampleFacade::class,
should() for Assertions (if the package includes testing helpers):
$this->should->seeInDatabase('users', ['email' => 'test@example.com']);
How can I help you explore Laravel packages today?