Added CRUD routes for benefits, success stories, and visa grants
Landing registration page completed except design
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Articles;
|
||||
use App\Models\Benefits;
|
||||
use App\Models\Blogs;
|
||||
use App\Models\Countries;
|
||||
use App\Models\Faqs;
|
||||
@ -15,8 +16,10 @@ use App\Models\Preparationclassoffers;
|
||||
use App\Models\Quicklinks;
|
||||
use App\Models\Services;
|
||||
use App\Models\Settings;
|
||||
use App\Models\Success_stories;
|
||||
use App\Models\Teams;
|
||||
use App\Models\Testimonials;
|
||||
use App\Models\Visa_grants;
|
||||
use App\Models\Visagrantposts;
|
||||
use CCMS;
|
||||
use Illuminate\Http\Request; // Import the Request class
|
||||
@ -39,12 +42,16 @@ class WebsiteController extends Controller
|
||||
|
||||
public function home()
|
||||
{
|
||||
|
||||
return view("bibhuti.landing");
|
||||
return view('landing.index', [
|
||||
'benefits' => Benefits::get(),
|
||||
'success_stories' => Success_stories::get(),
|
||||
'visa_grants' => Visa_grants::get(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function showTeam(){
|
||||
$teamList = Teams::orderBy('display_order','asc')->get();
|
||||
public function showTeam()
|
||||
{
|
||||
$teamList = Teams::orderBy('display_order', 'asc')->get();
|
||||
return view("$this->path.pages.team", compact('teamList'));
|
||||
}
|
||||
|
||||
@ -79,15 +86,15 @@ class WebsiteController extends Controller
|
||||
$contact = DB::table("contacts")->where("contact_id", $menuItem->ref)->get()[0];
|
||||
|
||||
return view("client.jupiter.inside.contact", compact('contact'));
|
||||
// break;
|
||||
// break;
|
||||
case 'tbl_countries':
|
||||
//$countries=DB::table("countries")->where("article_id",$menuItem->ref)->get()[0];
|
||||
//return view("client.jupiter.inside.article",compact('article'));
|
||||
//break;
|
||||
//$countries=DB::table("countries")->where("article_id",$menuItem->ref)->get()[0];
|
||||
//return view("client.jupiter.inside.article",compact('article'));
|
||||
//break;
|
||||
case 'tbl_articles':
|
||||
$article = DB::table("articles")->where("article_id", $menuItem->ref)->get()[0];
|
||||
return view("client.jupiter.inside.article", compact('article'));
|
||||
//break;
|
||||
//break;
|
||||
case '':
|
||||
default:
|
||||
// echo $menuItem->alias;die;
|
||||
@ -98,7 +105,6 @@ class WebsiteController extends Controller
|
||||
} else {
|
||||
return view("client.jupiter.inside" . ltrim($menuItem->ref));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,9 +139,9 @@ class WebsiteController extends Controller
|
||||
|
||||
public function showDestination($alias = null, $subalias = null)
|
||||
{
|
||||
if($alias){
|
||||
$destination = Countries::where('alias',$alias)->with(['articles','institutions'])->first();
|
||||
if(!$destination){
|
||||
if ($alias) {
|
||||
$destination = Countries::where('alias', $alias)->with(['articles', 'institutions'])->first();
|
||||
if (!$destination) {
|
||||
return view("$this->path.pages.404");
|
||||
}
|
||||
return view("$this->path.pages.destination", compact('destination'));
|
||||
@ -203,13 +209,13 @@ class WebsiteController extends Controller
|
||||
|
||||
public function showBlogs($alias = null)
|
||||
{
|
||||
if($alias){
|
||||
$blog = Blogs::where('alias',$alias)->first();
|
||||
if(!$blog){
|
||||
if ($alias) {
|
||||
$blog = Blogs::where('alias', $alias)->first();
|
||||
if (!$blog) {
|
||||
return view("$this->path.pages.404");
|
||||
}
|
||||
return view("$this->path.pages.blog-single",compact('blog'));
|
||||
}else{
|
||||
return view("$this->path.pages.blog-single", compact('blog'));
|
||||
} else {
|
||||
$blogList = Blogs::latest()->paginate(6);
|
||||
return view("$this->path.pages.blog-list", compact('blogList'));
|
||||
}
|
||||
@ -218,21 +224,21 @@ class WebsiteController extends Controller
|
||||
public function showFaqs()
|
||||
{
|
||||
$faqs = Faqs::latest()->get();
|
||||
return view("$this->path.pages.faq",compact('faqs'));
|
||||
return view("$this->path.pages.faq", compact('faqs'));
|
||||
}
|
||||
|
||||
public function showServices($alias = null)
|
||||
{
|
||||
if($alias){
|
||||
$service = Services::where('alias',$alias)->first();
|
||||
if(!$service){
|
||||
if ($alias) {
|
||||
$service = Services::where('alias', $alias)->first();
|
||||
if (!$service) {
|
||||
return view("$this->path.pages.404");
|
||||
}
|
||||
return view("$this->path.pages.service-single",compact('service'));
|
||||
}else{
|
||||
return view("$this->path.pages.service-single", compact('service'));
|
||||
} else {
|
||||
|
||||
$serviceList = Services::orderBy('display_order','asc')->take(15)->get();
|
||||
return view("$this->path.pages.service-list",compact('serviceList'));
|
||||
$serviceList = Services::orderBy('display_order', 'asc')->take(15)->get();
|
||||
return view("$this->path.pages.service-list", compact('serviceList'));
|
||||
}
|
||||
}
|
||||
|
||||
@ -240,12 +246,11 @@ class WebsiteController extends Controller
|
||||
{
|
||||
if ($alias) {
|
||||
$data = Articles::where("alias", $alias)->where('status', 1)->with('children')->first();
|
||||
if(!$data){
|
||||
if (!$data) {
|
||||
return view("$this->path.pages.404");
|
||||
}
|
||||
return view("$this->path.pages.$alias", compact('data'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function showevents(Request $r, $alias = null, $subalias = null)
|
||||
@ -376,15 +381,15 @@ class WebsiteController extends Controller
|
||||
|
||||
public function showGalleries($alias = null)
|
||||
{
|
||||
if($alias){
|
||||
if ($alias) {
|
||||
$gallery = Galleries::where('alias', $alias)->first();
|
||||
if(!$gallery){
|
||||
if (!$gallery) {
|
||||
return view("$this->path.pages.404");
|
||||
}
|
||||
return view("$this->path.pages.gallery-single", compact('gallery'));
|
||||
}else{
|
||||
$galleryList = Galleries::where('status', 1)->latest()->select(['title', 'alias', 'thumb'])->paginate(12);
|
||||
return view("$this->path.pages.gallery-list", compact('galleryList'));
|
||||
} else {
|
||||
$galleryList = Galleries::where('status', 1)->latest()->select(['title', 'alias', 'thumb'])->paginate(12);
|
||||
return view("$this->path.pages.gallery-list", compact('galleryList'));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user