94 lines
4.9 KiB
PHP
94 lines
4.9 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\ApplicationController;
|
|
use App\Http\Controllers\EnvironmentAttachmentController;
|
|
use App\Http\Controllers\EnvironmentController;
|
|
use App\Http\Controllers\EnvironmentDeploymentController;
|
|
use App\Http\Controllers\EnvironmentMigrationController;
|
|
use App\Http\Controllers\EnvironmentVariableController;
|
|
use App\Http\Controllers\EnvironmentWorkerController;
|
|
use App\Http\Controllers\OnboardingController;
|
|
use App\Http\Controllers\OrganisationController;
|
|
use App\Http\Controllers\ProvisionCallback;
|
|
use App\Http\Controllers\ProvisionScript;
|
|
use App\Http\Controllers\RegistryController;
|
|
use App\Http\Controllers\ServerController;
|
|
use App\Http\Controllers\ServiceController;
|
|
use App\Http\Controllers\ServiceUpdateController;
|
|
use App\Http\Controllers\SourceProviderController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::inertia('/', 'Welcome')->name('home');
|
|
|
|
Route::middleware(['auth', 'verified'])->group(function () {
|
|
Route::get('/dashboard', function () {
|
|
return inertia('Dashboard', [
|
|
'organisations' => auth()->user()->organisations,
|
|
]);
|
|
})->name('dashboard');
|
|
|
|
Route::prefix('organisations/{organisation}')->group(function () {
|
|
Route::get('/', [OrganisationController::class, 'show'])->name('organisations.show');
|
|
Route::get('/onboarding', [OnboardingController::class, 'show'])->name('onboarding.show');
|
|
|
|
Route::resource('registries', RegistryController::class)
|
|
->only('create', 'store')
|
|
->name('create', 'registries.create')
|
|
->name('store', 'registries.store');
|
|
Route::resource('source-providers', SourceProviderController::class)
|
|
->only('create', 'store')
|
|
->name('create', 'source-providers.create')
|
|
->name('store', 'source-providers.store');
|
|
|
|
Route::resource('servers', ServerController::class)
|
|
->only('index', 'show', 'create', 'store')
|
|
->name('index', 'servers.index')
|
|
->name('show', 'servers.show')
|
|
->name('create', 'servers.create')
|
|
->name('store', 'servers.store');
|
|
|
|
Route::prefix('servers/{server}')->group(function () {
|
|
Route::resource('services', ServiceController::class)
|
|
->only('create', 'store', 'show', 'edit', 'update')
|
|
->name('create', 'services.create')
|
|
->name('store', 'services.store')
|
|
->name('show', 'services.show')
|
|
->name('edit', 'services.edit')
|
|
->name('update', 'services.update');
|
|
Route::get('services/{service}/updates/create', [ServiceUpdateController::class, 'create'])
|
|
->name('service-updates.create');
|
|
Route::post('services/{service}/updates', [ServiceUpdateController::class, 'store'])
|
|
->name('service-updates.store');
|
|
});
|
|
|
|
Route::resource('applications', ApplicationController::class)
|
|
->only('show', 'index', 'create', 'store')
|
|
->name('index', 'applications.index')
|
|
->name('show', 'applications.show');
|
|
Route::get('applications/{application}/environments/{environment}', [EnvironmentController::class, 'show'])
|
|
->name('environments.show');
|
|
Route::get('applications/{application}/environments/{environment}/attachments/create', [EnvironmentAttachmentController::class, 'create'])
|
|
->name('environment-attachments.create');
|
|
Route::post('applications/{application}/environments/{environment}/attachments', [EnvironmentAttachmentController::class, 'store'])
|
|
->name('environment-attachments.store');
|
|
Route::post('applications/{application}/environments/{environment}/workers', [EnvironmentWorkerController::class, 'store'])
|
|
->name('environment-workers.store');
|
|
Route::post('applications/{application}/environments/{environment}/migrations', [EnvironmentMigrationController::class, 'store'])
|
|
->name('environment-migrations.store');
|
|
Route::post('applications/{application}/environments/{environment}/deployments', [EnvironmentDeploymentController::class, 'store'])
|
|
->name('environment-deployments.store');
|
|
Route::get('applications/{application}/environments/{environment}/variables/create', [EnvironmentVariableController::class, 'create'])
|
|
->name('environment-variables.create');
|
|
Route::post('applications/{application}/environments/{environment}/variables', [EnvironmentVariableController::class, 'store'])
|
|
->name('environment-variables.store');
|
|
Route::post('applications/{application}/verify-repository', [ApplicationController::class, 'verifyRepository'])
|
|
->name('applications.verify-repository');
|
|
});
|
|
});
|
|
|
|
Route::get('/provision-script', ProvisionScript::class)->name('provision-script');
|
|
Route::post('/provision-callback', ProvisionCallback::class)->name('provision.callback');
|
|
|
|
require __DIR__.'/settings.php';
|
|
require __DIR__.'/auth.php';
|