mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
418 B
PHP
19 lines
418 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\ProfileSponsor;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Http\Request;
|
|
|
|
class ProfileSponsorController extends Controller
|
|
{
|
|
public function get(Request $request, $id): JsonResponse
|
|
{
|
|
$profile = ProfileSponsor::whereProfileId($id)->first();
|
|
$res = $profile ? $profile->sponsors : [];
|
|
|
|
return response()->json($res);
|
|
}
|
|
}
|