链街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.

35 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. {
  9. public function getPrimaryKeyColumn()
  10. {
  11. return '_id';
  12. }
  13. public function get(Grid\Model $model)
  14. {
  15. $ssdb = new SsdbClient();
  16. $coupon = $ssdb->client()->hgetall('coupon_rebate_activity');
  17. return $model->makePaginator(
  18. 1,
  19. [
  20. [
  21. 'id'=>1,
  22. 'activity'=>$coupon['activity'],
  23. 'forward'=>$coupon['forward'],
  24. 'repay' => $coupon['repay']
  25. ],
  26. ]
  27. );
  28. }
  29. }