123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace App\Repositories;
- use App\Models\PolicyProperty;
- use Prettus\Repository\Eloquent\BaseRepository;
- /**
- * Class ArticlePropertyReoositoryEloquent.
- *
- * @package namespace App\Repositories;
- */
- class PolicyPropertyReoository extends BaseRepository
- {
- /**
- * Specify Model class name
- *
- * @return string
- */
- public function model()
- {
- return PolicyProperty::class;
- }
- /**
- * @param $where array
- * @return null|\Illuminate\Database\Eloquent\Model
- */
- public function getProperty($where)
- {
- return $this->model->where($where)->orderBy('category_order', 'desc')->orderBy('created_at', 'desc')->first();
- }
- }
|