Start work on updating services
This commit is contained in:
@@ -7,7 +7,7 @@ use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
use App\Models\{Account,Invoice,Payment,Service,Service\Adsl,Service\Voip,User};
|
||||
use App\Models\{Account,Invoice,Payment,Service,Service\Broadband,Service\Phone,User};
|
||||
|
||||
class SearchController extends Controller
|
||||
{
|
||||
@@ -65,8 +65,8 @@ class SearchController extends Controller
|
||||
$result->push(['name'=>sprintf('%s: %s',$o->sid,$o->account->name),'value'=>'/u/invoice/'.$o->id,'category'=>'Invoices']);
|
||||
}
|
||||
|
||||
# Look for an ADSL/NBN Service
|
||||
foreach (Service\Broadband::Search($request->input('term'))
|
||||
# Look for an Broadband Service
|
||||
foreach (Broadband::Search($request->input('term'))
|
||||
->whereIN('account_id',$accounts)
|
||||
->orderBy('service_number')
|
||||
->limit(10)->get() as $o)
|
||||
@@ -74,13 +74,13 @@ class SearchController extends Controller
|
||||
$result->push(['name'=>sprintf('%s (%s)',$o->service_name,$o->service->sid),'value'=>'/u/service/'.$o->id,'category'=>'Broadband']);
|
||||
}
|
||||
|
||||
# Look for an VOIP Service
|
||||
foreach (Voip::Search($request->input('term'))
|
||||
# Look for an Phone Service
|
||||
foreach (Phone::Search($request->input('term'))
|
||||
->whereIN('account_id',$accounts)
|
||||
->orderBy('service_number')
|
||||
->limit(10)->get() as $o)
|
||||
{
|
||||
$result->push(['name'=>sprintf('%s (%s)',$o->service_name,$o->service->sid),'value'=>'/u/service/'.$o->id,'category'=>'VOIP']);
|
||||
$result->push(['name'=>sprintf('%s (%s)',$o->service_name,$o->service->sid),'value'=>'/u/service/'.$o->id,'category'=>'Phone']);
|
||||
}
|
||||
|
||||
# Look for Domain Name
|
||||
|
Reference in New Issue
Block a user