ActivityController.php 593 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Http\Controllers\Admin\Pair;
  3. use App\Models\Fpdx\ActivityModel;
  4. use Illuminate\Http\Request;
  5. use App\Http\Controllers\Controller;
  6. class ActivityController extends Controller
  7. {
  8. //
  9. public function index(Request $request)
  10. {
  11. $activitys = ActivityModel::get();
  12. return response([
  13. 'code' => 200,
  14. 'data' => $activitys
  15. ]);
  16. }
  17. public function show($id)
  18. {
  19. $activity = ActivityModel::find($id);
  20. return response([
  21. 'code' => 200,
  22. 'data' => $activity
  23. ]);
  24. }
  25. }