2018-06-05 11:13:57 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
2020-02-06 22:11:02 +00:00
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
use App\User;
|
2018-06-05 11:13:57 +00:00
|
|
|
|
|
|
|
class UserServicesController extends Controller
|
|
|
|
{
|
2020-02-06 22:11:02 +00:00
|
|
|
public function invoices(User $o)
|
2018-06-19 12:31:49 +00:00
|
|
|
{
|
2020-02-06 22:11:02 +00:00
|
|
|
return ['data'=>$o->invoices_due->values()];
|
2018-06-19 12:31:49 +00:00
|
|
|
}
|
|
|
|
|
2020-02-06 22:11:02 +00:00
|
|
|
public function payments(User $o)
|
2018-06-19 12:31:49 +00:00
|
|
|
{
|
2020-02-06 22:11:02 +00:00
|
|
|
return ['data'=>$o->payment_history->values()];
|
2018-06-05 11:13:57 +00:00
|
|
|
}
|
|
|
|
|
2020-02-06 22:11:02 +00:00
|
|
|
public function services(User $o)
|
2018-06-05 11:13:57 +00:00
|
|
|
{
|
2020-02-06 22:11:02 +00:00
|
|
|
return ['data'=>$o->services_active->values()];
|
2018-06-05 11:13:57 +00:00
|
|
|
}
|
|
|
|
}
|