PHP code example of 3ev / repoman
1. Go to this page and download the library: Download 3ev/repoman library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
3ev / repoman example snippets
namespace Entity\Repositories;
use Tev\Repoman\Repositories\RepositoryInterface;
class Repository implements RepositoryInterface
{
public function getAll()
{
// ...
}
public function chunk($size, $callback)
{
// ...
}
public function find($id)
{
// ...
}
public function create(array $data)
{
// ...
}
public function update($id, array $data)
{
// ...
}
public function delete($id)
{
// ...
}
}
namespace Entity\Repositories\Eloquent;
use Entity\Models\ExampleModel;
use Tev\Repoman\Repositories\Eloquent\Repository;
class ExampleModelRepository extends Repository
{
public function __construct()
{
$this->model = new ExampleModel;
}
}