19 lines
384 B
PHP
19 lines
384 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Illuminate\Support\Facades\Auth;
|
||
|
|
||
|
use App\Models\Account;
|
||
|
|
||
|
class ResellerServicesController extends Controller
|
||
|
{
|
||
|
public function services(Request $request,Account $o)
|
||
|
{
|
||
|
return $o->services
|
||
|
->filter(function($item) use ($request) {
|
||
|
return $item->active || ($item->id == $request->include);
|
||
|
});
|
||
|
}
|
||
|
}
|