Singularize model names.
This commit is contained in:
parent
7c916ad38f
commit
8ba479e51f
25 changed files with 73 additions and 73 deletions
|
@ -49,7 +49,7 @@ class PackController extends Controller
|
|||
public function listByOption(Request $request, $id)
|
||||
{
|
||||
return view('admin.services.packs.byoption', [
|
||||
'option' => Models\ServiceOptions::with('service', 'packs')->findOrFail($id),
|
||||
'option' => Models\ServiceOption::with('service', 'packs')->findOrFail($id),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ class ServersController extends Controller
|
|||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function postNewServerServiceOptions(Request $request)
|
||||
public function postNewServerServiceOption(Request $request)
|
||||
{
|
||||
if (! $request->input('service')) {
|
||||
return response()->json([
|
||||
|
@ -162,7 +162,7 @@ class ServersController extends Controller
|
|||
|
||||
$service = Models\Service::select('executable', 'startup')->where('id', $request->input('service'))->first();
|
||||
|
||||
return response()->json(Models\ServiceOptions::select('id', 'name', 'docker_image')->where('service_id', $request->input('service'))->orderBy('name', 'asc')->get());
|
||||
return response()->json(Models\ServiceOption::select('id', 'name', 'docker_image')->where('service_id', $request->input('service'))->orderBy('name', 'asc')->get());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -179,7 +179,7 @@ class ServersController extends Controller
|
|||
], 500);
|
||||
}
|
||||
|
||||
$option = Models\ServiceOptions::with('variables')->with(['packs' => function ($query) {
|
||||
$option = Models\ServiceOption::with('variables')->with(['packs' => function ($query) {
|
||||
$query->where('selectable', true);
|
||||
}])->findOrFail($request->input('option'));
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ class ServiceController extends Controller
|
|||
|
||||
public function getOption(Request $request, $service, $option)
|
||||
{
|
||||
$option = Models\ServiceOptions::with('service', 'variables')->findOrFail($option);
|
||||
$option = Models\ServiceOption::with('service', 'variables')->findOrFail($option);
|
||||
$option->setRelation('servers', $option->servers()->with('user')->paginate(25));
|
||||
|
||||
return view('admin.services.options.view', ['option' => $option]);
|
||||
|
@ -205,7 +205,7 @@ class ServiceController extends Controller
|
|||
public function getNewVariable(Request $request, $service, $option)
|
||||
{
|
||||
return view('admin.services.options.variable', [
|
||||
'option' => Models\ServiceOptions::with('service')->findOrFail($option),
|
||||
'option' => Models\ServiceOption::with('service')->findOrFail($option),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ class ServerController extends Controller
|
|||
}]);
|
||||
$this->authorize('view-startup', $server);
|
||||
|
||||
$variables = Models\ServiceVariables::select(
|
||||
$variables = Models\ServiceVariable::select(
|
||||
'service_variables.*',
|
||||
DB::raw('COALESCE(server_variables.variable_value, service_variables.default_value) as a_serverValue')
|
||||
)->leftJoin('server_variables', 'server_variables.variable_id', '=', 'service_variables.id')
|
||||
|
|
|
@ -144,7 +144,7 @@ class AdminRoutes
|
|||
]);
|
||||
|
||||
$router->post('/new/service-options', [
|
||||
'uses' => 'Admin\ServersController@postNewServerServiceOptions',
|
||||
'uses' => 'Admin\ServersController@postNewServerServiceOption',
|
||||
]);
|
||||
|
||||
$router->post('/new/option-details', [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue