added form entertaiment and fix file upload
This commit is contained in:
+16
-10
@@ -13,7 +13,9 @@ use App\Http\Controllers\Master\RayonController;
|
||||
use App\Http\Controllers\Master\CostCentreController;
|
||||
use App\Http\Controllers\Master\CategoryController;
|
||||
use App\Http\Controllers\Forms\FormVehicleController;
|
||||
use App\Http\Controllers\Forms\FormEntertainmentPresentationController;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Helpers\NextCloudHelper;
|
||||
|
||||
Auth::routes();
|
||||
|
||||
@@ -80,6 +82,14 @@ Route::middleware(['auth:admin', 'menu'])->group(function () {
|
||||
Route::get('/vehicle-running-cost/edit/{id}', [FormVehicleController::class, 'edit'])->name('forms.vehicle.edit');
|
||||
Route::put('/vehicle-running-cost/update/{id}', [FormVehicleController::class, 'update'])->name('forms.vehicle.update');
|
||||
Route::delete('/vehicle-running-cost/destroy/{id}', [FormVehicleController::class, 'destroy'])->name('forms.vehicle.destroy');
|
||||
|
||||
// Entertainment & Presentation
|
||||
Route::get('/entertainment-presentation', [FormEntertainmentPresentationController::class, 'index'])->name('forms.entertainment');
|
||||
Route::get('/entertainment-presentation/create', [FormEntertainmentPresentationController::class, 'create'])->name('forms.entertainment.create');
|
||||
Route::post('/entertainment-presentation/store', [FormEntertainmentPresentationController::class, 'store'])->name('forms.entertainment.store');
|
||||
Route::get('/entertainment-presentation/edit/{id}', [FormEntertainmentPresentationController::class, 'edit'])->name('forms.entertainment.edit');
|
||||
Route::put('/entertainment-presentation/update/{id}', [FormEntertainmentPresentationController::class, 'update'])->name('forms.entertainment.update');
|
||||
Route::delete('/entertainment-presentation/destroy/{id}', [FormEntertainmentPresentationController::class, 'destroy'])->name('forms.entertainment.destroy');
|
||||
});
|
||||
|
||||
//Menu Role
|
||||
@@ -88,14 +98,10 @@ Route::middleware(['auth:admin', 'menu'])->group(function () {
|
||||
});
|
||||
|
||||
Route::get('/test-nextcloud', function () {
|
||||
$disk = Storage::disk('nextcloud');
|
||||
$folderPath = 'test-directory';
|
||||
|
||||
// Check if directory exists
|
||||
if (!$disk->exists($folderPath)) {
|
||||
$disk->makeDirectory($folderPath);
|
||||
return "Directory created: $folderPath";
|
||||
}
|
||||
|
||||
return "Directory already exists: $folderPath";
|
||||
$baseUrl = env('NEXT_CLOUD_URL');
|
||||
$adminUsername = env('NEXT_CLOUD_USERNAME');
|
||||
$adminPassword = env('NEXT_CLOUD_PASSWORD');
|
||||
|
||||
$response = NextCloudHelper::createFolder($baseUrl, $adminUsername, $adminPassword, 'test-folder');
|
||||
dd($response);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user