链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
764 B

  1. <?php
  2. namespace App\Admin\Repositories;
  3. use Dcat\Admin\Grid;
  4. use Dcat\Admin\Repositories\Repository;
  5. use Illuminate\Pagination\LengthAwarePaginator;
  6. use App\Libs\SsdbClient;
  7. class CouponTie extends Repository{
  8. public function getPrimaryKeyColumn()
  9. {
  10. return '_id';
  11. }
  12. public function get(Grid\Model $model)
  13. {
  14. $ssdb = new SsdbClient();
  15. $coupon = $ssdb->client()->hgetall('coupon_rebate_activity');
  16. return $model->makePaginator(
  17. 1,
  18. [
  19. [
  20. 'id'=>1,
  21. 'activity'=>$coupon['activity'],
  22. 'forward'=>$coupon['forward'],
  23. 'repay' => $coupon['repay']
  24. ],
  25. ],
  26. );
  27. }
  28. }