PolicyController.php 594 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Http\Controllers\Api\V2;
  3. use App\Http\Resources\V2\PolicyCollection;
  4. use App\Models\Page;
  5. use Illuminate\Http\Request;
  6. class PolicyController extends Controller
  7. {
  8. public function sellerPolicy()
  9. {
  10. return new PolicyCollection(Page::where('type', 'seller_policy_page')->get());
  11. }
  12. public function supportPolicy()
  13. {
  14. return new PolicyCollection(Page::where('type', 'support_policy_page')->get());
  15. }
  16. public function returnPolicy()
  17. {
  18. return new PolicyCollection(Page::where('type', 'return_policy_page')->get());
  19. }
  20. }