Version 1.0.0
This commit is contained in:
35
routes/api.php
Normal file
35
routes/api.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\Api\HeaderController;
|
||||
use App\Http\Controllers\Api\HomepageController;
|
||||
use App\Http\Controllers\Api\FooterController;
|
||||
use App\Http\Controllers\Api\EmployeeController;
|
||||
use App\Http\Controllers\Api\NavigationItemController;
|
||||
use App\Http\Controllers\Api\ArticleNewsController;
|
||||
use App\Http\Controllers\Api\ArticleController;
|
||||
use App\Http\Controllers\Api\ContactController;
|
||||
use App\Http\Controllers\Api\JobOffersController;
|
||||
use App\Http\Controllers\Api\PriceController;
|
||||
use App\Http\Controllers\Api\ProjectController;
|
||||
use App\Http\Controllers\Api\TelephoneController;
|
||||
use App\Http\Controllers\Api\DietController;
|
||||
|
||||
Route::middleware('web')->group(function () {
|
||||
Route::get('/header', [HeaderController::class, 'index']);
|
||||
Route::get('/homepage', [HomepageController::class, 'index']);
|
||||
Route::get('/footer', [FooterController::class, 'index']);
|
||||
Route::get('/employees', [EmployeeController::class, 'index']);
|
||||
Route::get('/navigation-items', [NavigationItemController::class, 'index']);
|
||||
Route::get('/news', [ArticleNewsController::class, 'index']);
|
||||
Route::get('/articles', [ArticleController::class, 'index']);
|
||||
Route::get('/contact', [ContactController::class, 'index']);
|
||||
Route::post('/contact/send', [ContactController::class, 'sendMessage']);
|
||||
Route::get('/joboffers', [JobOffersController::class, 'index']);
|
||||
Route::get('/price', [PriceController::class, 'index']);
|
||||
Route::get('/projects/{typeSlug?}', [ProjectController::class, 'index']);
|
||||
Route::get('/projects/{typeSlug}/{projectSlug}', [ProjectController::class, 'show']);
|
||||
Route::get('/telephones', [TelephoneController::class, 'index']);
|
||||
Route::get('/diets', [DietController::class, 'index']);
|
||||
});
|
||||
8
routes/console.php
Normal file
8
routes/console.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->purpose('Display an inspiring quote');
|
||||
71
routes/web.php
Normal file
71
routes/web.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Inertia\Inertia;
|
||||
|
||||
Route::get('/', function () {
|
||||
return Inertia::render('home');
|
||||
})->name('home');
|
||||
|
||||
Route::get('kontakt', function () {
|
||||
return Inertia::render('contact');
|
||||
})->name('contact');
|
||||
|
||||
Route::post('kontakt/wyslij', [\App\Http\Controllers\Api\ContactController::class, 'sendMessage'])->name('contact.send');
|
||||
|
||||
Route::get('administracja/{slug}', function ($slug) {
|
||||
return Inertia::render('employees', ['slug' => $slug]);
|
||||
})->name('employees');
|
||||
|
||||
Route::get('aktualnosci', function () {
|
||||
return Inertia::render('news/news', ['page' => request()->query('strona', 1)]);
|
||||
})->name('news');
|
||||
|
||||
Route::get('aktualnosci/{slug}', function ($slug) {
|
||||
return Inertia::render('news/news-details', ['slug' => $slug]);
|
||||
})->name('news-details');
|
||||
|
||||
Route::get('oferty-pracy', function () {
|
||||
return Inertia::render('joboffers');
|
||||
})->name('joboffers');
|
||||
|
||||
Route::get('cennik-badan', function () {
|
||||
return Inertia::render('price');
|
||||
})->name('price');
|
||||
|
||||
Route::get('diety', function () {
|
||||
return Inertia::render('diets', ['page' => request()->query('strona', 1)]);
|
||||
})->name('diets');
|
||||
|
||||
Route::get('telefony', function () {
|
||||
return Inertia::render('telephones');
|
||||
})->name('telephones');
|
||||
|
||||
Route::get('informacje/{slug}', function ($slug) {
|
||||
return Inertia::render('article', ['slug' => $slug, 'categorySlug' => null]);
|
||||
})->name('article');
|
||||
|
||||
Route::get('informacje/{categorySlug}/{slug}', function ($categorySlug, $slug) {
|
||||
$category = \App\Models\Category::where('slug', $categorySlug)->first();
|
||||
if (!$category) {
|
||||
return abort(404);
|
||||
}
|
||||
|
||||
return Inertia::render('article', ['slug' => $slug, 'categorySlug' => $categorySlug]);
|
||||
})->name('category.article');
|
||||
|
||||
Route::get('projekty/{typeSlug?}', function ($typeSlug = null) {
|
||||
return Inertia::render('projects/projects', ['typeSlug' => $typeSlug]);
|
||||
})->name('projects');
|
||||
|
||||
Route::get('projekty/{typeSlug}/{projectSlug}', function ($typeSlug, $projectSlug) {
|
||||
$projectType = \App\Models\ProjectType::where('slug', $typeSlug)->first();
|
||||
if (!$projectType) {
|
||||
return abort(404);
|
||||
}
|
||||
|
||||
return Inertia::render('projects/project-details', [
|
||||
'typeSlug' => $typeSlug,
|
||||
'projectSlug' => $projectSlug
|
||||
]);
|
||||
})->name('project.details');
|
||||
Reference in New Issue
Block a user