// SYSTEM PANEL //
[ROOT]
/
mnt
/
pleskStorage
/
vhosts
/
kodsolutions.net
/
subdomains
/
go-rent.kodsolutions.net
/
routes
[ PARENT ]
EDIT :: web.php
<?php use App\Http\Controllers\Admin\Car\BrandsController; use App\Http\Controllers\Admin\CitiesController; use App\Http\Controllers\Auth\AuthController; use App\Http\Controllers\Auth\BusinessAuthController; use App\Http\Controllers\Auth\CarsController; use App\Http\Controllers\Auth\FavouritesController; use App\Http\Controllers\Auth\ProfileController; use App\Http\Controllers\Auth\ResetPasswordController; use App\Http\Controllers\Website\HomeController; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider and all of them will | be assigned to the "web" middleware group. Make something great! | */ Route::get('/', function () { return redirect(app()->getLocale()); }); Route::group([ 'namespace' => 'App\\Http\\Controllers\\Website', 'prefix' => '{locale}', 'where' => ['locale' => '[a-zA-Z]{2}'], 'as' => 'website.', 'middleware' => 'setlocale', ], function () { Route::get('/', [HomeController::class, 'index'])->name('home'); Route::get('get-areas', [CitiesController::class, 'getAreasForWebsite'])->name('get-areas'); Route::get('about-us', 'HomeController@showAboutUs')->name('about.show'); Route::get('clients', 'HomeController@showClients')->name('clients.index'); Route::get('services', 'HomeController@showServices')->name('services.index'); Route::get('cities', 'HomeController@showCities')->name('cities.index'); Route::get('brands', 'HomeController@showBrands')->name('brands.index'); Route::get('faqs', 'HomeController@showFaqs')->name('faqs.index'); Route::get('terms-conditions', 'HomeController@showTerms')->name('terms.index'); Route::get('privacy-policy', 'HomeController@showPrivacy')->name('privacy.index'); Route::get('articles', 'ArticlesController@index')->name('articles.index'); Route::get('articles/{slug}', 'ArticlesController@show')->name('articles.show'); Route::get('cars', 'CarsController@index')->name('cars.index'); Route::get('cars-map', 'CarsController@map')->name('cars.map'); Route::get('cars/{code}/{slug}', 'CarsController@show')->name('cars.show'); Route::get('contact-us', 'HomeController@showContactUs')->name('contact-us.show'); Route::post('contact-us', 'HomeController@contactUs')->name('contact-us.store'); Route::get('booking/{car}', 'HomeController@booking')->name('booking.create'); Route::post('booking/{car}', 'HomeController@financeRequest')->name('finance.store'); Route::post('subscribe', 'HomeController@subscribe')->name('subscribe.store'); Route::group(['middleware' => ['guest']], function () { Route::get('login', [AuthController::class, 'login']) ->name('login'); Route::post('login', [AuthController::class, 'postLogin']) ->name('login.post'); Route::get('register', [AuthController::class, 'register']) ->name('register.post'); Route::post('register', [AuthController::class, 'postRegister']) ->name('register'); Route::get('register-office', [AuthController::class, 'officeRegister']) ->name('register-office'); Route::post('register-office', [AuthController::class, 'postOfficeRegister']) ->name('office.register.post'); Route::get('business-register', [BusinessAuthController::class, 'register']) ->name('business-register.post'); Route::post('business-register', [BusinessAuthController::class, 'postRegister']) ->name('business-register'); Route::get('/forgot-password', [ResetPasswordController::class, 'show'])->name('forgot-password.show'); Route::post('/forgot-password', [ResetPasswordController::class, 'sendCode'])->name('forgot-password.post'); Route::post('/reset-password', [ResetPasswordController::class, 'resetPassword'])->name('forgot-password.reset'); }); Route::group(['middleware' => 'auth', 'as' => 'auth.'], function () { Route::prefix('bookings')->controller(App\Http\Controllers\Website\BookingController::class)->group(function () { Route::get('/', 'index')->name('booking.index'); Route::get('/create', 'create')->name('booking.create'); Route::get('/{id}', 'show')->name('booking.show'); Route::post('/store', 'store')->name('booking.store'); Route::get('/{id}/edit', 'edit')->name('booking.edit'); Route::put('/update/{id}', 'update')->name('booking.update'); Route::delete('/delete/{id}', 'destroy')->name('booking.delete'); Route::get('/view/calendar/filter', 'calendar')->name('booking.calendar'); }); Route::get('reviews', 'HomeController@showReviews')->name('reviews.index'); Route::get('profile', [ProfileController::class, 'index']) ->name('profile.index'); Route::put('profile', [ProfileController::class, 'update']) ->name('profile.update'); Route::get('update-password', [ProfileController::class, 'editPassword']) ->name('profile.password.edit'); Route::put('update-password', [ProfileController::class, 'updatePassword']) ->name('profile.password.update'); Route::post('logout', [AuthController::class, 'logout']) ->name('logout'); Route::get('profile/home', [ProfileController::class, 'home']) ->name('profile.home'); Route::get('favourites', [FavouritesController::class, 'favourites']) ->name('favourites.index'); Route::post('favourites/store', [FavouritesController::class, 'store']) ->name('favourites.store'); Route::group(['as' => 'office.', 'middleware' => 'access.cars'], function () { Route::get('/get-models', [BrandsController::class, 'getModelsByBrand'])->name('getModels'); Route::get('vehicles', [CarsController::class, 'index']) ->name('vehicles.index'); Route::get('vehicles/create', [CarsController::class, 'create']) ->name('vehicles.create'); Route::get('vehicles/show/{slug}', [CarsController::class, 'show']) ->name('vehicles.show'); Route::post('vehicles', [CarsController::class, 'store']) ->name('vehicles.store'); Route::get('vehicles/{slug}', [CarsController::class, 'show']) ->name('vehicles.show'); Route::get('vehicles/{slug}/edit', [CarsController::class, 'edit']) ->name('vehicles.edit'); Route::put('vehicles/{slug}', [CarsController::class, 'update']) ->name('vehicles.update'); Route::get('get-models', [CarsController::class, 'getModels']) ->name('get-models'); // Document deletion route Route::post('vehicles/delete-document', [CarsController::class, 'deleteDocument']) ->name('vehicles.delete-document'); // Update pricing and availability route Route::put('vehicles/{code}/update-pricing', [CarsController::class, 'updatePricing']) ->name('vehicles.update-pricing'); // Update availability status only route Route::put('vehicles/{code}/update-availability', [CarsController::class, 'updateAvailability']) ->name('vehicles.update-availability'); // Image upload route Route::post('vehicles/upload-images', [CarsController::class, 'uploadImages']) ->name('vehicles.upload-images'); // Delete image route Route::post('vehicles/delete-image', [CarsController::class, 'deleteImage']) ->name('vehicles.delete-image'); }); }); }); Route::get('/migrate', function () { Artisan::call('optimize:clear'); Artisan::call('migrate', [ '--force' => true, ]); dd('migrated!'); });
SAVE
CANCEL