mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 15:33:44 +01:00
Added labels fetch for Domains show
Added labels fetch for Domains show
This commit is contained in:
parent
a3b7cfb88f
commit
51de05b917
@ -25,13 +25,19 @@ class DomainsController extends Controller
|
|||||||
|
|
||||||
public function show(Domains $domain)
|
public function show(Domains $domain)
|
||||||
{
|
{
|
||||||
|
|
||||||
$service_extras = DB::table('domains as d')
|
$service_extras = DB::table('domains as d')
|
||||||
->join('providers as p', 'd.provider_id', '=', 'p.id')
|
->join('providers as p', 'd.provider_id', '=', 'p.id')
|
||||||
->join('pricings as pr', 'd.id', '=', 'pr.service_id')
|
->join('pricings as pr', 'd.id', '=', 'pr.service_id')
|
||||||
->where('d.id', '=', $domain->id)
|
->where('d.id', '=', $domain->id)
|
||||||
->get(['d.*', 'p.name as provider_name', 'pr.*']);
|
->get(['d.*', 'p.name as provider_name', 'pr.*']);
|
||||||
|
|
||||||
return view('domains.show', compact(['domain', 'service_extras']));
|
$labels = DB::table('labels_assigned as l')
|
||||||
|
->join('labels', 'l.label_id', '=', 'labels.id')
|
||||||
|
->where('l.service_id', '=', $domain->id)
|
||||||
|
->get(['labels.label']);
|
||||||
|
|
||||||
|
return view('domains.show', compact(['domain', 'service_extras', 'labels']));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
|
Loading…
Reference in New Issue
Block a user