Download the PHP package leandrowkz/laravel-basis without Composer
On this page you can find all versions of the php package leandrowkz/laravel-basis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download leandrowkz/laravel-basis
More information about leandrowkz/laravel-basis
Files in leandrowkz/laravel-basis
Package laravel-basis
Short Description Laravel Basis is a package that provides a base service layer to your application, containing CRUD operations.
License MIT
Informations about the package laravel-basis
Laravel Basis
Laravel Basis is a package that provides a base CRUD layer for your application.
Leandrowkz\Basis\Controllers\BaseController
Leandrowkz\Basis\Services\BaseService
Leandrowkz\Basis\Traits\AccessibleProps
Leandrowkz\Basis\Traits\MutatesProps
These classes provides an easy way to CRUD operations inside Laravel apps. All you have to do is to extend and configure your classes from those available here.
Leandrowkz\Basis\Controllers\BaseController
Every class extended from BaseController must set the $service
and $request
(for validation) class names strings (Ex: FooService::class).
Leandrowkz\Basis\Service\BaseService
Every class exteded from BaseService must set $model
class name string (Ex: FooModel::class). The create/update operations are done by using de $fillable
array presented on $model
class.
Leandrowkz\Basis\Traits\AccessibleProps
This trait adds to the target class fluent getters/setters to access any property through a method with same name. As a caveat it breaks any property visibility.
Leandrowkz\Basis\Traits\MutatesProps
This trait adds a method that fetch all class properties and transforms all props with valid class names into objects of same class. Ex:
License
This code is published under the MIT License. This means you can do almost anything with it, as long as the copyright notice and the accompanying license file is left intact.
Contributing
Feel free to send pull requests or create issues if you come across problems or have great ideas. Any input is appreciated!