lk.zachem.info/routes/web.php
2025-04-21 18:46:13 +08:00

62 lines
2.5 KiB
PHP

<?php
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
use App\Http\Controllers\Company\CreateCompanyController;
use App\Http\Controllers\Company\AgentController;
/*
|--------------------------------------------------------------------------
| 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 view(view: 'welcome');
});
Auth::routes();
Route::get('/email/verify/{id}/{hash}', function (EmailVerificationRequest $request)
{
$request->fulfill();
return redirect('/home');
})->middleware(['auth', 'signed'])->name('verification.verify');
//Company
Route::get('/company/create', App\Http\Controllers\Company\CreateCompanyFormController::class)->name('company.form.create');
Route::post('/company/create', CreateCompanyController::class)->name('company.create');
Route::get('/company/confirmer', function ()
{
return view(view: 'company.post_confirmer');
});
Route::middleware(['auth'])->group(function ()
{
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::get('/clients/table', [App\Http\Controllers\ClientsTableController::class, 'index'])->name('clients.table');
Route::get('/contract/{contract}', [App\Http\Controllers\Deal\ContractController::class, 'index'])->name('contract');
Route::get('/company/details/{company?}', [App\Http\Controllers\Company\DetailsController::class, 'index'])->name('company.details');
Route::post('/company/{company}/details/', [App\Http\Controllers\Company\DetailsController::class, 'store'])->name('company.details.store');
Route::get('/agents/table', [App\Http\Controllers\Company\AgentsTableController::class, 'index'])->name('company.agents.table');
Route::post('/company/agents/store/', App\Http\Controllers\Company\CreateAgentController::class)->name('company.agents.store');
Route::get('/company/agents/{agent}/delete', App\Http\Controllers\Company\DeleteAgentController::class)->name('company.agents.delete');
Route::get('/company/agents/{agent}/restore', App\Http\Controllers\Company\RestoreAgentController::class)->name('company.agents.restore');
});
//МАКЕТЫ
Route::get('projects', function ()
{
return view(view: 'makets.projects');
});
Route::get('profile', function ()
{
return view(view: 'user.profile');
});