Created
May 31, 2018 01:03
-
-
Save maxca/1e779fdf57863076535239e0897818a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author samark chaisanguan | |
* @email [email protected] | |
*/ | |
namespace App\Repository\Good; | |
use App\Models\Good\Good; | |
use Lumpineevill\BaseRepository; | |
use App\Models\Good\GoodModel; | |
class GoodRepository extends BaseRepository implements GoodInterface | |
{ | |
/** | |
* set limit | |
* @var integer | |
*/ | |
protected $limit = 30; | |
/** | |
* set order by column | |
* @var string | |
*/ | |
protected $orderBy = 'id'; | |
/** | |
* set sort type | |
* @var string | |
*/ | |
protected $sortType = 'desc'; | |
/** | |
* set model | |
* @var class | |
*/ | |
protected $classModel = GoodModel::class; | |
/** | |
* set search column like | |
* @var array | |
*/ | |
protected $searchColumnLike = []; | |
/** | |
* set serach column date | |
* @var array | |
*/ | |
protected $searchColumnDate = []; | |
public function __construct() | |
{ | |
parent::__construct(); | |
} | |
/** | |
* GetGoodByID | |
* @param $id integer | |
* @return mixed | |
*/ | |
public function getGoodByID($id) | |
{ | |
return $this->model->find($id); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment