1
0
Fork 0
pixelfed/app/Http/Controllers/ProfileSponsorController.php

18 lines
345 B
PHP
Raw Normal View History

2019-07-12 01:53:14 +00:00
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\ProfileSponsor;
use Auth;
class ProfileSponsorController extends Controller
{
public function get(Request $request, $id)
{
2019-08-17 07:41:35 +00:00
$profile = ProfileSponsor::whereProfileId($id)->first();
$res = $profile ? $profile->sponsors : [];
return response()->json($res);
2019-07-12 01:53:14 +00:00
}
}