2017 © Pedro Peláez
 

project laravel-basis

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

image

leandrowkz/laravel-basis

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  • Friday, July 6, 2018
  • by leandrowkz
  • Repository
  • 1 Watchers
  • 1 Stars
  • 69 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 17 Versions
  • 0 % Grown

The README.md

Laravel Basis

Build Status Latest Stable Version License, (*1)

Laravel Basis is a package that provides a base CRUD layer for your application., (*2)

Laravel Basis, (*3)

  • 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., (*4)

Leandrowkz\Basis\Controllers\BaseController

Every class extended from BaseController must set the $service and $request (for validation) class names strings (Ex: FooService::class)., (*5)

protected $service;
protected $request;
public function all();
public function find(string $id);
public function create(array $data);
public function update(string $id, array $data);
public function delete(string $id);
public function exists($id);
public function validate();
public function service(BaseServiceInterface $service = null);

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., (*6)

protected $model;
public function all();
public function find(string $id);
public function query($where);
public function create(array $data);
public function update(string $id, array $data);
public function delete(string $id);
public function model(string $model = null);

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., (*7)

protected $foo = 1;
protected $bar = 2;
$this->foo(); // returns 1;
$this->bar(); // returns 2;
$this->foo(3); // sets $this->foo as 3;
$this->bar(3); // sets $this->bar as 3;

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:, (*8)

protected $customService = MyService::class; // string
$this->customService; // string
$this->mutateProps();
$this->customService; // MyService object

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., (*9)

Contributing

Feel free to send pull requests or create issues if you come across problems or have great ideas. Any input is appreciated!, (*10)

The Versions

06/07 2018

dev-master

9999999-dev

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

06/07 2018

v2.5.0

2.5.0.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

02/07 2018

v2.4.1

2.4.1.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

28/06 2018

v2.4.0

2.4.0.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

28/06 2018

v2.3.0

2.3.0.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

21/06 2018

v2.2.1

2.2.1.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

21/06 2018

v2.2.0

2.2.0.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

21/06 2018

v2.1.4

2.1.4.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

20/06 2018

v2.1.3

2.1.3.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

19/06 2018

v2.1.2

2.1.2.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

18/06 2018

v2.1.1

2.1.1.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

18/06 2018

v2.1.0

2.1.0.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

17/06 2018

v2.0.0

2.0.0.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

15/06 2018

v1.0.2

1.0.2.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

12/06 2018

v1.0.1

1.0.1.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

08/06 2018

v1.0.0

1.0.0.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leandro Mangini Antunes

07/06 2018

v0.0.1

0.0.1.0

Laravel Basis is a package that provides a base layer to your application, containing CRUD operations and events.

  Sources   Download

MIT

The Requires

 

by Leandro Mangini Antunes