diff --git a/app/Http/Requests/Api/Application/Databases/DeleteDatabaseRequest.php b/app/Http/Requests/Api/Application/Databases/DeleteDatabaseRequest.php index 83e31df10..3281f8767 100644 --- a/app/Http/Requests/Api/Application/Databases/DeleteDatabaseRequest.php +++ b/app/Http/Requests/Api/Application/Databases/DeleteDatabaseRequest.php @@ -25,8 +25,8 @@ class DeleteDatabaseRequest extends ApplicationApiRequest */ public function resourceExists(): bool { - $database = $this->route()->parameter('database'); + $databaseHost = $this->route()->parameter('databaseHost'); - return $database instanceof DatabaseHost && $database->exists; + return $databaseHost instanceof DatabaseHost && $databaseHost->exists; } } diff --git a/app/Http/Requests/Api/Application/Databases/GetDatabaseRequest.php b/app/Http/Requests/Api/Application/Databases/GetDatabaseRequest.php index ba679b5aa..3e2912340 100644 --- a/app/Http/Requests/Api/Application/Databases/GetDatabaseRequest.php +++ b/app/Http/Requests/Api/Application/Databases/GetDatabaseRequest.php @@ -13,8 +13,8 @@ class GetDatabaseRequest extends GetDatabasesRequest */ public function resourceExists(): bool { - $database = $this->route()->parameter('database'); + $databaseHost = $this->route()->parameter('databaseHost'); - return $database instanceof DatabaseHost && $database->exists; + return $databaseHost instanceof DatabaseHost && $databaseHost->exists; } } diff --git a/app/Http/Requests/Api/Application/Databases/UpdateDatabaseRequest.php b/app/Http/Requests/Api/Application/Databases/UpdateDatabaseRequest.php index 4c689696a..7561713c1 100644 --- a/app/Http/Requests/Api/Application/Databases/UpdateDatabaseRequest.php +++ b/app/Http/Requests/Api/Application/Databases/UpdateDatabaseRequest.php @@ -15,6 +15,6 @@ class UpdateDatabaseRequest extends StoreDatabaseRequest */ public function rules(array $rules = null): array { - return $rules ?? DatabaseHost::getRulesForUpdate($this->route()->parameter('database')->id); + return $rules ?? DatabaseHost::getRulesForUpdate($this->route()->parameter('databaseHost')->id); } } diff --git a/routes/api-application.php b/routes/api-application.php index f6554be7e..08d8a54c9 100644 --- a/routes/api-application.php +++ b/routes/api-application.php @@ -14,13 +14,13 @@ Route::get('/version', 'VersionController'); */ Route::group(['prefix' => '/databases'], function () { Route::get('/', 'Databases\DatabaseController@index'); - Route::get('/{database}', 'Databases\DatabaseController@view'); + Route::get('/{databaseHost}', 'Databases\DatabaseController@view'); Route::post('/', 'Databases\DatabaseController@store'); - Route::patch('/{database}', 'Databases\DatabaseController@update'); + Route::patch('/{databaseHost}', 'Databases\DatabaseController@update'); - Route::delete('/{database}', 'Databases\DatabaseController@delete'); + Route::delete('/{databaseHost}', 'Databases\DatabaseController@delete'); }); /*