This commit is contained in:
Doar Mihai
2026-04-04 18:19:34 +03:00
parent 5fb17f717d
commit 7c09846bd6
22 changed files with 1229 additions and 94 deletions
+14 -1
View File
@@ -25,6 +25,19 @@ class HomeController extends Controller
->orderBy('name')
->get();
return view('home', compact('featuredJobs', 'recentJobs', 'stats', 'categories'));
// Get filter options for search form
$jobTypes = \App\Models\Job::select('job_type')
->whereNotNull('job_type')
->distinct()
->pluck('job_type')
->toArray();
$experienceLevels = \App\Models\Job::select('experience_level')
->whereNotNull('experience_level')
->distinct()
->pluck('experience_level')
->toArray();
return view('home', compact('featuredJobs', 'recentJobs', 'stats', 'categories', 'jobTypes', 'experienceLevels'));
}
}
+3 -3
View File
@@ -53,10 +53,10 @@ class JobController extends Controller
/**
* Display the specified job
*/
public function show(int $id)
public function show(Job $job)
{
$job = Job::with(['source', 'category', 'jobLocation'])
->findOrFail($id);
// Load relationships
$job->load(['source', 'category', 'jobLocation']);
// Track job view event
AnalyticsEvent::logEvent(AnalyticsEvent::EVENT_JOB_VIEW, $job->id);
@@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use Illuminate\View\View;
class PageController extends Controller
{
public function about(): View
{
return view('pages.about');
}
public function contact(): View
{
return view('pages.contact');
}
public function privacy(): View
{
return view('pages.privacy');
}
public function terms(): View
{
return view('pages.terms');
}
}