PHP code example of thoth-pharaoh / base-model-repository
1. Go to this page and download the library: Download thoth-pharaoh/base-model-repository 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/ */
thoth-pharaoh / base-model-repository example snippets
bash
namespace App\Repositories;
use App\Models\Blog;
use Pharaoh\BaseModelRepository\Repositories\AbstractBaseRepository;
class BlogRepository extends AbstractBaseRepository
{
public function __construct(Blog $blog)
{
$this->model = $blog;
$this->table = $this->model->getTable();
}
}