feat: Implement Career Management Module
- Created CareerController for handling career-related CRUD operations. - Added Career model with necessary attributes and relationships. - Created migration for careers table with relevant fields. - Developed views for creating, editing, and listing careers. - Implemented DataTables for career listing with action buttons. - Added routes for career management and integrated with sidebar. - Created client-side career detail template and updated career listing page. - Added helper functions to fetch active careers for display.
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Modules\CCMS\Models\Blog;
|
||||
use Modules\CCMS\Models\Career;
|
||||
use Modules\CCMS\Models\Country;
|
||||
use Modules\CCMS\Models\Institution;
|
||||
use Modules\CCMS\Models\Page;
|
||||
@@ -130,6 +131,13 @@ class WebsiteController extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function careerSingle($id)
|
||||
{
|
||||
$data['career'] = Career::findorFail($id);
|
||||
|
||||
return view("client.$this->path.pages.career-detail-template", $data);
|
||||
}
|
||||
|
||||
public function testSingle($alias)
|
||||
{
|
||||
$testPreparations = $data["page"] = Test::where('status', 1)
|
||||
@@ -181,6 +189,7 @@ class WebsiteController extends Controller
|
||||
$teams = getTeams(limit: null, order: 'asc');
|
||||
$blogs = getBlogs(limit: null, order: 'asc');
|
||||
$galleriesCSR = getPageWithChildrenBySlug(parent: $parent, slug: 'gallery', limit: null, order: 'asc');
|
||||
$careers = getCareers(limit: null, order: 'asc');
|
||||
if (!$page) {
|
||||
return view('client.raffles.errors.404');
|
||||
}
|
||||
@@ -191,7 +200,7 @@ class WebsiteController extends Controller
|
||||
return view('client.raffles.errors.404');
|
||||
}
|
||||
|
||||
return view($path, ['page' => $page, 'teams' => $teams, 'blogs' => $blogs, 'galleriesCSR' => $galleriesCSR]);
|
||||
return view($path, ['page' => $page, 'teams' => $teams, 'blogs' => $blogs, 'galleriesCSR' => $galleriesCSR], ['careers' => $careers]);
|
||||
}
|
||||
|
||||
public function fallback()
|
||||
|
Reference in New Issue
Block a user