1. Go to this page and download the library: Download akunbeben/laravository 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/ */
namespace App\Repositories\Eloquent;
use Akunbeben\Laravository\Repositories\Eloquent\BaseRepository;
use App\Repositories\Interfaces\UserRepositoryInterface;
use App\Models\User;
class UserRepository extends BaseRepository implements UserRepositoryInterface
{
protected $model;
/**
* Your model to use the Eloquent
*
* @param User $model
*/
public function __construct(User $model)
{
$this->model = $model;
}
}