LISTEN/NOTIFY, custom types, or advanced transactions). This is ideal for:
QueryManager could serve as a drop-in replacement for raw SQL queries, but Eloquent ORM compatibility is non-existent. Key challenges:
DatabaseManager).ModelManager) may introduce unnecessary overhead if only Foundation is needed. The package’s small community (69 stars, 0 dependents) signals limited adoption.hstore, JSONB, or advisory locks) that Foundation uniquely enables?spatie/laravel-postgres, doctrine/dbal) that offer similar benefits with lower risk?LISTEN/NOTIFY, custom types) are critical.QueryManager.// app/Providers/FoundationServiceProvider.php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use PommProject\Foundation\ConnectionManager;
class FoundationServiceProvider extends ServiceProvider {
public function register() {
$this->app->singleton('pomm.connection', function ($app) {
$config = $app['config']['database.connections.pgsql'];
return new ConnectionManager($config['dsn'], $config['options']);
});
}
}
QueryManager to execute raw SQL migrations or build a custom migration adapter.// app/Facades/Foundation.php
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
class Foundation extends Facade {
protected static function getFacadeAccessor() { return 'pomm.connection'; }
}
Session and QueryManager to log query performance, connection metrics, and errors.| Laravel Component | Foundation Support | Integration Strategy | Risk |
|---|---|---|---|
| Eloquent ORM | ❌ No | Avoid or build custom adapter | High |
| Query Builder | ⚠️ Partial (raw SQL only) | Wrap in Facade or use directly | Medium |
| Migrations | ❌ No | Execute raw SQL or build custom migration tool | High |
| Model Events | ❌ No | Replace with Laravel’s event system or custom logic | High |
| Database Transactions | ✅ Yes (via Session) |
Use Foundation’s transaction methods | Low |
| Connection Pooling | ✅ Built-in | Replace Laravel’s PDO connections | Medium (config complexity) |
| Service Container | ✅ Yes | Bind via Service Provider | Low |
| LISTEN/NOTIFY | ✅ Yes | Use Foundation’s async message support | Low |
How can I help you explore Laravel packages today?