swayok / peskyorm-laravel
Service Providers and other classes to replace laravel's Eloquent ORM by PeskyORM
Installs: 1 034
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/swayok/peskyorm-laravel
Requires
- php: >=7.4.0
- ext-json: *
- ext-pdo: *
- laravel/framework: >=5.3
- swayok/peskyorm: dev-v2_1
- swayok/peskyorm-columns-collection: dev-orm_v2_1
Requires (Dev)
This package is auto-updated.
Last update: 2025-10-06 11:21:00 UTC
README
This is a package with classes used to replace Laravel's Eloquent ORM by PeskyORM
Installation
Add service provider
Add \PeskyORMLaravel\Providers\PeskyOrmServiceProvider::class to providers array in config/app.php
This will also register:
- 
\PeskyORMLaravel\Providers\PeskyValidationServiceProvider- several situational validators;
- 
\PeskyORMLaravel\Providers\PeskyOrmUserProvider-Authwill use PeskyORM and its Record object to manage authorisation. Which Record class to use is configured inconfig/auth.phpinprovidersarray:'providers' => [ 'frontend' => [ 'driver' => 'peskyorm', 'model' => \App\Db\User\User::class, ] ]
- 
\PeskyORMLaravel\Console\Commands\OrmMakeDbClassesCommandCommand (php artisan orm:make-db-classes) - generates DB classes by table name
- 
If you have DebugBar package enabled - it will be configured to display queries executed by PeskyOrm adapters (only if this functionality is enabled in DebugBar) 
Publish config using artisan
php artisan vendor:publish --tag=config --force
This will add config/peskyorm.php file
Notes
- Remove Illuminate\Validation\ValidationServiceProvider::classfromprovidersarray inconfig/app.php-\PeskyORMLaravel\Providers\PeskyValidationServiceProvider::classreplaces it
- You may remove 'Eloquent' => Illuminate\Database\Eloquent\Model::classformhelpersarray inconfig/app.phpif you're not going to use it along with PeskyORM
- You may also remove Illuminate\Pagination\PaginationServiceProvider::classandIlluminate\Auth\Passwords\PasswordResetServiceProvider::classformproviders(don't forget to remove'Password' => Illuminate\Support\Facades\Password::classhelper) because PeskyORM does not support these currently.
- Do not remove Laravel's DatabaseServiceProvider- some parts of Laravel use it to do service things like migrations, db seeding, etc.
- Do not remove DBhelper - it may be useful and it won't harm your app's perfomance or stability
Todo
- Update tests and cover more functionality
- Think about a helper facade