parent
e2558d5f2e
commit
0ed9bae401
2307 changed files with 803959 additions and 101 deletions
@ -0,0 +1,210 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Http\Resources\SliderResource; |
||||
use App\Models\AboutUs; |
||||
use App\Models\AboutUsPoint; |
||||
use App\Models\User; |
||||
use App\Models\Setting; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class AboutUsController extends Controller |
||||
{ |
||||
/** |
||||
* Display a listing of the resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
|
||||
protected $view = 'admin.about_us.'; |
||||
protected $redirect = 'admin/about_us'; |
||||
public function index() |
||||
{ |
||||
$settings = AboutUs::orderBy('id','DESC'); |
||||
// if(\request('title1')){ |
||||
// $key = \request('title1'); |
||||
// $settings = $settings->where('title1','like','%'.$key.'%'); |
||||
// } |
||||
// if(\request('status')){ |
||||
// $key = \request('status'); |
||||
// $settings = $settings->where('status',$key); |
||||
// } |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for creating a new resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
/** |
||||
* Store a newly created resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function store(Request $request) |
||||
{ |
||||
$this->validate(\request(),[ |
||||
|
||||
|
||||
'description' => 'required', |
||||
'image' => 'required|file|mimes:jpeg,png,jpg', |
||||
'keyword' => 'required' |
||||
]); |
||||
|
||||
$setting = new AboutUs(); |
||||
|
||||
$setting->description = strip_tags(\request('description')); |
||||
$setting->sub_description = strip_tags(\request('sub_description')); |
||||
$setting->status = \request('status'); |
||||
$setting->keyword = \request('keyword'); |
||||
$setting->seo_title = \request('seo_title'); |
||||
$setting->meta_keyword = strip_tags(\request('meta_keyword')); |
||||
$setting->seo_description = strip_tags(\request('seo_description')); |
||||
$setting->slug = Setting::create_slug(\request('seo_title')); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('about_us',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
if($extension == "jpeg" || $extension == "jpg" || $extension == "png"){ |
||||
$image_path = $out_put_path[0]; |
||||
$setting->image = $image_path; |
||||
// $setting->doc_name = $out_put_path[2]; |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
if($setting->save()){ |
||||
$points = $request->points; |
||||
if($points[0] != null){ |
||||
foreach($points as $key => $point){ |
||||
|
||||
$about_us_point = new AboutUsPoint(); |
||||
|
||||
$about_us_point->about_us_id = $setting->id; |
||||
|
||||
|
||||
$about_us_point->point = $point; |
||||
$about_us_point->save(); |
||||
} |
||||
} |
||||
|
||||
Session::flash('success','About Us has been created!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* Display the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function show($id) |
||||
{ |
||||
$about_us = AboutUs::findorfail($id); |
||||
return view($this->view.'show',compact('about_us')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for editing the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function edit($id) |
||||
{ |
||||
$about_us = AboutUs::findorfail($id); |
||||
return view($this->view.'edit',compact('about_us')); |
||||
} |
||||
|
||||
/** |
||||
* Update the specified resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function update(Request $request, $id) |
||||
{ |
||||
$setting=AboutUs::findorfail($id); |
||||
|
||||
$this->validate(\request(),[ |
||||
'keyword' => 'required', |
||||
'description' => 'required', |
||||
'image' => 'file|mimes:jpeg,png,jpg', |
||||
'status' => 'required' |
||||
]); |
||||
|
||||
|
||||
|
||||
$setting->description = strip_tags(\request('description')); |
||||
$setting->sub_description = strip_tags(\request('sub_description')); |
||||
$setting->status = \request('status'); |
||||
$setting->keyword = \request('keyword'); |
||||
$setting->seo_title = \request('seo_title'); |
||||
$setting->meta_keyword = strip_tags(\request('meta_keyword')); |
||||
$setting->seo_description = strip_tags(\request('seo_description')); |
||||
$setting->point_title = strip_tags(\request('point_title')); |
||||
$setting->slug = Setting::create_slug(\request('seo_title')); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('about_us',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path = $out_put_path[0]; |
||||
$setting->image = $image_path; |
||||
// $setting->doc_name = $out_put_path[2]; |
||||
} |
||||
// $requestData = $request->all(); |
||||
// $setting->fill($requestData); |
||||
if($setting->update()){ |
||||
$points = $request->points; |
||||
|
||||
if((!empty($points)) && ($points[0] != null)){ |
||||
$about_us_point = $setting->about_us_points(); |
||||
$about_us_point->delete(); |
||||
foreach($points as $point){ |
||||
$about_us_point = new AboutUsPoint(); |
||||
$about_us_point->about_us_id = $id; |
||||
$about_us_point->point = $point; |
||||
$about_us_point->save(); |
||||
} |
||||
} |
||||
Session::flash('success','About Us has been Updated!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* Remove the specified resource from storage. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function destroy($id) |
||||
{ |
||||
// |
||||
} |
||||
|
||||
public function getSliders(){ |
||||
|
||||
$settings = Slider::where('status',1)->get(); |
||||
return SliderResource::collection($settings); |
||||
} |
||||
} |
@ -0,0 +1,278 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Accomodation; |
||||
use App\Models\BlogPoint; |
||||
use App\Models\NewsAndUpdatePoint; |
||||
use App\Models\Setting; |
||||
use App\Models\User; |
||||
use App\Models\AccomodationFeature; |
||||
use App\Models\AccomodationInformation; |
||||
use App\Models\AccomodationSliderTitle; |
||||
use App\Models\AccomodationImage; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Auth; |
||||
use Illuminate\Support\Facades\Session; |
||||
// use function GuzzleHttp\Promise\all; |
||||
|
||||
class AccomodationController extends Controller |
||||
{ |
||||
protected $view = 'admin.accomodation.'; |
||||
protected $redirect = 'admin/accomodations'; |
||||
|
||||
public function index() |
||||
{ |
||||
$settings = Accomodation::orderBy('id','DESC'); |
||||
|
||||
if(\request('name')){ |
||||
$key = \request('name'); |
||||
$settings = $settings->where('title','like','%'.$key.'%'); |
||||
} |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$settings = $settings->where('status',$key); |
||||
} |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create() |
||||
{ |
||||
return view($this->view . 'create'); |
||||
} |
||||
|
||||
public function store(Request $request) |
||||
{ |
||||
|
||||
$this->validate(\request(), [ |
||||
'title' => 'required', |
||||
'phone' => 'required', |
||||
'address' => 'required', |
||||
'status' => 'required', |
||||
'images' => 'required', |
||||
'slider_image' => 'required|file|mimes:jpeg,png,jpg' |
||||
]); |
||||
|
||||
if($request->has('slider_image')){ |
||||
|
||||
$extension = \request()->file('slider_image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('accomodation',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request()->file('slider_image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
|
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['slider_image'] = $image_path1; |
||||
} |
||||
|
||||
|
||||
// $requestData['slug'] = Setting::create_slug($requestData['keyword']); |
||||
$accomodation = Accomodation::create($requestData); |
||||
|
||||
if($request->hasFile('images')){ |
||||
foreach($request->file('images') as $imagefile) { |
||||
$extension = $imagefile->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('accomodation',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image($imagefile,$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
$accomodation_image = new AccomodationImage(); |
||||
$accomodation_image->accomodation_id = $accomodation->id; |
||||
$accomodation_image->image = $image_path1; |
||||
$accomodation_image->save(); |
||||
|
||||
} |
||||
|
||||
} |
||||
if(\request('feature_name')){ |
||||
foreach (\request('feature_name') as $index => $value){ |
||||
$setting_point = new AccomodationFeature(); |
||||
$setting_point->accomodation_id = $accomodation->id; |
||||
$setting_point->feature_name = $value; |
||||
$setting_point->save(); |
||||
} |
||||
} |
||||
if(\request('information_name')){ |
||||
foreach (\request('information_name') as $index => $value){ |
||||
$setting_point = new AccomodationInformation(); |
||||
$setting_point->accomodation_id = $accomodation->id; |
||||
$setting_point->information_name = $value; |
||||
$setting_point->save(); |
||||
} |
||||
} |
||||
if(\request('title_name')){ |
||||
foreach (\request('title_name') as $index => $value){ |
||||
$setting_point = new AccomodationSliderTitle(); |
||||
$setting_point->accomodation_id = $accomodation->id; |
||||
$setting_point->title_name = $value; |
||||
$setting_point->save(); |
||||
} |
||||
} |
||||
Session::flash('success','Accomodation successfully created'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function show($id) |
||||
{ |
||||
$setting =Accomodation::findorfail($id); |
||||
return view($this->view.'show',compact('setting')); |
||||
} |
||||
|
||||
public function edit($id){ |
||||
$setting =Accomodation::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request, $id){ |
||||
|
||||
// dd(\request()->all()); |
||||
$setting =Accomodation::findorfail($id); |
||||
$this->validate(\request(), [ |
||||
'title' => 'required', |
||||
'phone' => 'required', |
||||
'address' => 'required', |
||||
'status' => 'required' |
||||
// 'images' => 'required', |
||||
// 'slider_image' => 'required|file|mimes:jpeg,png,jpg' |
||||
]); |
||||
|
||||
if(\request('slider_image')){ |
||||
$this->validate(\request(),[ |
||||
'image' => 'file|mimes:jpeg,png,jpg' |
||||
]); |
||||
if($request->hasFile('slider_image')){ |
||||
$extension = $request->file('slider_image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('accomodation',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image($request->file('slider_image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
if (is_file(public_path().'/'.$setting->slider_image) && file_exists(public_path().'/'.$setting->slider_image)){ |
||||
unlink(public_path().'/'.$setting->slider_image); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
$requestData = $request->all(); |
||||
// $requestData['slug'] = Setting::create_slug($requestData['keyword']); |
||||
if(isset($image_path1)){ |
||||
$requestData['slider_image'] = $image_path1; |
||||
} |
||||
$setting->fill($requestData); |
||||
if($setting->save()){ |
||||
|
||||
if($request->hasFile('images')){ |
||||
|
||||
$accommodation_image = $setting->accommodation_images(); |
||||
$accommodation_image->delete(); |
||||
foreach($request->file('images') as $imagefile) { |
||||
$extension = $imagefile->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('accomodation',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image($imagefile,$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
// if (is_file(public_path().'/'.$setting->slider_image) && file_exists(public_path().'/'.$setting->slider_image)){ |
||||
// unlink(public_path().'/'.$setting->slider_image); |
||||
// } |
||||
$accomodation_image = new AccomodationImage(); |
||||
$accomodation_image->accomodation_id = $id; |
||||
$accomodation_image->image = $image_path1; |
||||
$accomodation_image->save(); |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
if(\request('feature_name') ){ |
||||
$accommodation_feature = $setting->accommodation_features(); |
||||
$accommodation_feature->delete(); |
||||
foreach (\request('feature_name') as $index => $value){ |
||||
$setting_point = new AccomodationFeature(); |
||||
$setting_point->accomodation_id = $id; |
||||
$setting_point->feature_name = $value; |
||||
$setting_point->save(); |
||||
} |
||||
} |
||||
|
||||
if(\request('information_name') ){ |
||||
$accommodation_information = $setting->accommodation_informations(); |
||||
$accommodation_information->delete(); |
||||
foreach (\request('information_name') as $index => $value){ |
||||
$setting_point = new AccomodationInformation(); |
||||
$setting_point->accomodation_id = $id; |
||||
$setting_point->information_name = $value; |
||||
$setting_point->save(); |
||||
} |
||||
} |
||||
|
||||
if(\request('title_name') ){ |
||||
$accommodation_title = $setting->accommodation_slider_titles(); |
||||
$accommodation_title->delete(); |
||||
foreach (\request('title_name') as $index => $value){ |
||||
$setting_point = new AccomodationSlidertitle(); |
||||
$setting_point->accomodation_id = $id; |
||||
$setting_point->title_name = $value; |
||||
$setting_point->save(); |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
Session::flash('success','Accomodation succesffuly edited.'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
public function delete($id){ |
||||
$setting=Accomodation::findorfail($id); |
||||
// if($setting->accommodation_features->count() > 0){ |
||||
// $setting->accommodation_features()->delete(); |
||||
// } |
||||
// if($setting->accommodation_informations->count() > 0){ |
||||
// $setting->accommodation_informations()->delete(); |
||||
// } |
||||
// if($setting->accommodation_slider_titles->count() > 0){ |
||||
// $setting->accommodation_informations()->delete(); |
||||
// } |
||||
if($setting->delete()){ |
||||
if (is_file(public_path().'/'.$setting->slider_image) && file_exists(public_path().'/'.$setting->slider_image)){ |
||||
unlink(public_path().'/'.$setting->slider_image); |
||||
} |
||||
} |
||||
Session::flash('success','Accomodation successfully is deleted !'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function points_remove($id) |
||||
{ |
||||
if(Auth::user()){ |
||||
$setting = AccomodationFeature::findorfail($id); |
||||
$setting->delete(); |
||||
return response()->json(['point_id' => $id]); |
||||
} |
||||
|
||||
} |
||||
public function information_points_remove($id) |
||||
{ |
||||
if(Auth::user()){ |
||||
$setting = AccomodationInformation::findorfail($id); |
||||
$setting->delete(); |
||||
return response()->json(['point_id' => $id]); |
||||
} |
||||
|
||||
} |
||||
public function slider_points_remove($id) |
||||
{ |
||||
if(Auth::user()){ |
||||
$setting = AccomodationSliderTitle::findorfail($id); |
||||
$setting->delete(); |
||||
return response()->json(['point_id' => $id]); |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,112 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\AddSection; |
||||
use App\Models\Project; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class AddSectionController extends Controller |
||||
{ |
||||
protected $view = 'admin.add_section.'; |
||||
protected $redirect = 'admin/add-sections'; |
||||
|
||||
|
||||
public function index(){ |
||||
$settings = AddSection::orderBy('id','asc'); |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$settings = $settings->where('status',$key); |
||||
} |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create(){ |
||||
|
||||
return view($this->view.'create'); |
||||
|
||||
} |
||||
|
||||
public function store(Request $request){ |
||||
$this->validate(\request(),[ |
||||
'link'=>'required|string', |
||||
'image'=>'required|file|mimes:jpeg,png,jpg,pdf' |
||||
]); |
||||
|
||||
if($request->has('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('add_section',config('custom.image_folders')); |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
|
||||
$setting = AddSection::create($requestData); |
||||
Session::flash('success','Section is created'); |
||||
return redirect($this->redirect); |
||||
|
||||
|
||||
} |
||||
|
||||
public function edit($id){ |
||||
|
||||
$setting = AddSection::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request , $id){ |
||||
$setting =AddSection::findorfail($id); |
||||
$this->validate(\request(), [ |
||||
'link'=>'required|string', |
||||
'image' => 'file|mimes:jpeg,png,jpg,pdf', |
||||
]); |
||||
|
||||
|
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
|
||||
// |
||||
$image_folder_type = array_search('project',config('custom.image_folders')); //for image saved in folder search project index in config folder |
||||
|
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
|
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
|
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
Session::flash('success','Section is Updated'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
public function delete($id){ |
||||
|
||||
$setting=AddSection::findorfail($id); |
||||
if($setting->delete()){ |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
Session::flash('success','Section is deleted !'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
// |
||||
} |
@ -0,0 +1,27 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Applicant; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class ApplicantController extends Controller |
||||
{ |
||||
protected $view='admin.applicant.'; |
||||
protected $redirect='admin/applicants'; |
||||
|
||||
public function index(){ |
||||
$settings=Applicant::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function show($id){ |
||||
|
||||
$applicants = Applicant::findorfail($id); |
||||
return view($this->view.'show',compact('applicants')); |
||||
|
||||
} |
||||
} |
@ -0,0 +1,206 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Http\Resources\SliderResource; |
||||
use App\Models\Career; |
||||
use App\Models\CareerPoint; |
||||
use App\Models\AboutUsPoint; |
||||
use App\Models\User; |
||||
use App\Models\Setting; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class CareerController extends Controller |
||||
{ |
||||
/** |
||||
* Display a listing of the resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
|
||||
protected $view = 'admin.career.'; |
||||
protected $redirect = 'admin/careers'; |
||||
public function index() |
||||
{ |
||||
$settings = Career::orderBy('id','DESC'); |
||||
// if(\request('title1')){ |
||||
// $key = \request('title1'); |
||||
// $settings = $settings->where('title1','like','%'.$key.'%'); |
||||
// } |
||||
// if(\request('status')){ |
||||
// $key = \request('status'); |
||||
// $settings = $settings->where('status',$key); |
||||
// } |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for creating a new resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
/** |
||||
* Store a newly created resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function store(Request $request) |
||||
{ |
||||
$this->validate(\request(),[ |
||||
|
||||
|
||||
'title' => 'required', |
||||
'sub_title' => 'required', |
||||
'point_title' => 'required', |
||||
|
||||
'image' => 'required|file|mimes:jpeg,png,jpg', |
||||
'points' => 'required' |
||||
]); |
||||
|
||||
$setting = new Career(); |
||||
|
||||
$setting->title = \request('title'); |
||||
$setting->point_title = strip_tags(\request('point_title')); |
||||
$setting->sub_title = strip_tags(\request('sub_title')); |
||||
$setting->status = \request('status'); |
||||
$setting->keyword = strip_tags(\request('keyword')); |
||||
$setting->seo_title = strip_tags(\request('seo_title')); |
||||
$setting->meta_keyword = strip_tags(\request('meta_keyword')); |
||||
$setting->seo_description = strip_tags(\request('seo_description')); |
||||
$setting->slug = Setting::create_slug(\request('seo_title')); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('career',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
if($extension == "jpeg" || $extension == "jpg" || $extension == "png"){ |
||||
$image_path = $out_put_path[0]; |
||||
$setting->image = $image_path; |
||||
// $setting->doc_name = $out_put_path[2]; |
||||
} |
||||
} |
||||
|
||||
if($setting->save()){ |
||||
$points = $request->points; |
||||
|
||||
foreach($points as $point){ |
||||
$career_point = new CareerPoint(); |
||||
$career_point->career_id = $setting->id; |
||||
$career_point->point = $point; |
||||
$career_point->save(); |
||||
} |
||||
Session::flash('success','Career has been created!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* Display the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function show($id) |
||||
{ |
||||
$about_us = Career::findorfail($id); |
||||
return view($this->view.'show',compact('about_us')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for editing the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function edit($id) |
||||
{ |
||||
$about_us = Career::findorfail($id); |
||||
return view($this->view.'edit',compact('about_us')); |
||||
} |
||||
|
||||
/** |
||||
* Update the specified resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function update(Request $request, $id) |
||||
{ |
||||
$setting=Career::findorfail($id); |
||||
|
||||
$this->validate(\request(),[ |
||||
'title' => 'required', |
||||
'sub_title' => 'required', |
||||
// 'image' => 'file|mimes:jpeg,png,jpg', |
||||
'points' => 'required' |
||||
]); |
||||
|
||||
|
||||
|
||||
$setting->title = \request('title'); |
||||
$setting->point_title = strip_tags(\request('point_title')); |
||||
$setting->sub_title = strip_tags(\request('sub_title')); |
||||
$setting->status = \request('status'); |
||||
$setting->keyword = strip_tags(\request('keyword')); |
||||
$setting->seo_title = strip_tags(\request('seo_title')); |
||||
$setting->meta_keyword = strip_tags(\request('meta_keyword')); |
||||
$setting->seo_description = strip_tags(\request('seo_description')); |
||||
$setting->slug = Setting::create_slug(\request('seo_title')); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('career',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path = $out_put_path[0]; |
||||
$setting->image = $image_path; |
||||
// $setting->doc_name = $out_put_path[2]; |
||||
} |
||||
// $requestData = $request->all(); |
||||
// $setting->fill($requestData); |
||||
if($setting->update()){ |
||||
$points = $request->points; |
||||
|
||||
if((!empty($points)) && ($points[0] != null)){ |
||||
$career_point = $setting->career_points(); |
||||
$career_point->delete(); |
||||
foreach($points as $point){ |
||||
$career_point = new CareerPoint(); |
||||
$career_point->career_id = $id; |
||||
$career_point->point = $point; |
||||
$career_point->save(); |
||||
} |
||||
} |
||||
Session::flash('success','Career has been Updated!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* Remove the specified resource from storage. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function destroy($id) |
||||
{ |
||||
// |
||||
} |
||||
|
||||
public function getSliders(){ |
||||
|
||||
$settings = Slider::where('status',1)->get(); |
||||
return SliderResource::collection($settings); |
||||
} |
||||
} |
@ -0,0 +1,89 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Client; |
||||
use App\Models\Client as Setting; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class ClientController extends Controller |
||||
{ |
||||
protected $view = 'admin.client.'; |
||||
protected $redirect = 'admin/clients'; |
||||
|
||||
public function index() |
||||
{ |
||||
$settings = Setting::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
public function store(Request $request) |
||||
{ |
||||
$this->validate(\request(),[ |
||||
'logo' =>'required|file|mimes:jpeg,png,jpg,pdf', |
||||
'link' =>'required', |
||||
'status' =>'required', |
||||
]); |
||||
|
||||
if(\request('logo')){ |
||||
if($request->hasFile('logo')){ |
||||
$extension = \request()->file('logo')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('client',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('logo'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
} |
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['logo'] = $image_path1; |
||||
} |
||||
|
||||
Setting::create($requestData); |
||||
Session::flash('success','Testimonial is created!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
public function edit($id){ |
||||
$setting= Client::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request ,$id){ |
||||
$setting = Client::findorfail($id); |
||||
$this->validate(\request(),[ |
||||
'logo' =>'file|mimes:jpeg,png,jpg,pdf', |
||||
'link' =>'required', |
||||
'status' =>'required', |
||||
]); |
||||
|
||||
if(\request('logo')){ |
||||
if($request->hasFile('logo')){ |
||||
$extension = \request()->file('logo')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('client',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('logo'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
} |
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['logo'] = $image_path1; |
||||
} |
||||
|
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
Session::flash('success','Testimonial is Updated!'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,99 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use Illuminate\Http\Request; |
||||
use App\Models\Contact; |
||||
use App\Models\ContactDescription; |
||||
use Illuminate\Support\Facades\Session; |
||||
use Mail; |
||||
|
||||
class ContactUsController extends Controller |
||||
{ |
||||
protected $view = 'admin.contact.'; |
||||
protected $redirect = 'admin/contacts'; |
||||
|
||||
public function index() |
||||
{ |
||||
$settings = Contact::orderBy('id','DESC'); |
||||
if(\request('fullname')){ |
||||
$key = \request('fullname'); |
||||
$settings = $settings->where('fullname','like','%'.$key.'%'); |
||||
} |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$settings = $settings->where('status',$key); |
||||
} |
||||
$contacts = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('contacts')); |
||||
} |
||||
|
||||
public function show($id) |
||||
{ |
||||
|
||||
$contact = new Contact(); |
||||
|
||||
|
||||
$contact = $contact->findorfail($id); |
||||
|
||||
|
||||
return view($this->view . 'show', compact('contact')); |
||||
} |
||||
public function store(Request $request){ |
||||
|
||||
$this->validate(\request(),[ |
||||
'name' => 'required', |
||||
'email' => 'required|indisposable', |
||||
'phone' => 'required|digits:10', |
||||
|
||||
]); |
||||
|
||||
|
||||
$contact = new ContactUs(); |
||||
$contact->name = \request('name'); |
||||
$contact->email = \request('email'); |
||||
$contact->phone = \request('phone'); |
||||
$contact->query_type = \request('query_type'); |
||||
$contact->status = 1; |
||||
$contact->email_verified_at = \request('email_verified_at'); |
||||
|
||||
if($contact->save()){ |
||||
|
||||
$contact_description = new ContactDescription(); |
||||
$contact_description->contact_us_id = $contact->id; |
||||
$contact_description->contact_us_type = \request('contact_us_type'); |
||||
$contact_description->message = \request('message'); |
||||
$contact_description->save(); |
||||
|
||||
\Mail::send('admin.contact.mail', array( |
||||
|
||||
'name' =>\request('name'), |
||||
|
||||
'email' =>\request('email'), |
||||
|
||||
'query_type' => (\request('query_type') == '1') ? 'Contact' : 'Quick Enquiry', |
||||
|
||||
'contact_us_type' =>(\request('contact_us_type') == '1') ? 'Academic' : 'Service', |
||||
|
||||
'phone' =>\request('phone'), |
||||
|
||||
'msg' => \request('message'), |
||||
|
||||
'subject' => 'Contact Form', |
||||
|
||||
), function($message) use ($request){ |
||||
|
||||
$subject='Contact Form'; |
||||
|
||||
$message->to('info@extratechs.com.au', 'Extratech')->subject($subject); |
||||
|
||||
}); |
||||
|
||||
return response()->json(['success' => 'Your query is submitted successfully.','status' =>'Ok'],200); |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,62 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\department; |
||||
use App\Models\SubOffice; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class DepartmentController extends Controller |
||||
{ |
||||
protected $view='admin.department.'; |
||||
protected $redirect='admin/departments'; |
||||
|
||||
public function index(){ |
||||
$settings = department::Paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create(){ |
||||
$settings=SubOffice::all(); |
||||
return view($this->view.'create',compact('settings')); |
||||
} |
||||
|
||||
public function store(Request $request){ |
||||
$this->validate(\request(),[ |
||||
'name'=>'required|string', |
||||
'sub_office_id'=>'required', |
||||
]); |
||||
$requestData=$request->all(); |
||||
$setting=department::create($requestData); |
||||
Session::flash('success','Department is created'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function edit($id){ |
||||
$settings=department::findorfail($id); |
||||
$sub_offices=SubOffice::all(); |
||||
return view($this->view.'edit',compact('settings'),compact('sub_offices')); |
||||
} |
||||
|
||||
public function update(Request $request ,$id){ |
||||
$setting =department::findorfail($id); |
||||
|
||||
$this->validate(\request(),[ |
||||
'name'=>'required|string', |
||||
'sub_office_id'=>'required', |
||||
]); |
||||
$requestData=$request->all(); |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
Session::flash('success','Department is Updated'); |
||||
return redirect($this->redirect); |
||||
|
||||
|
||||
} |
||||
|
||||
public function delete(){ |
||||
|
||||
} |
||||
} |
@ -0,0 +1,37 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use Illuminate\Http\Request; |
||||
use App\Models\ContactUs; |
||||
use App\Models\ContactDescription; |
||||
use App\Models\PersonalDetail; |
||||
use Illuminate\Support\Facades\Session; |
||||
use Mail; |
||||
|
||||
class EnrollmentController extends Controller |
||||
{ |
||||
protected $view = 'admin.enrollment.'; |
||||
protected $redirect = 'admin/enrollments'; |
||||
|
||||
public function index() |
||||
{ |
||||
$personal_details = PersonalDetail::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('personal_details')); |
||||
} |
||||
|
||||
public function show($id) |
||||
{ |
||||
|
||||
$personal_detail = new PersonalDetail(); |
||||
|
||||
|
||||
$personal_detail = $personal_detail->findorfail($id); |
||||
|
||||
|
||||
return view($this->view . 'show', compact('personal_detail')); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,152 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Academy; |
||||
use App\Models\Gallery; |
||||
use App\Models\BlogPoint; |
||||
use App\Models\NewsAndUpdatePoint; |
||||
use App\Models\Setting; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Auth; |
||||
use Illuminate\Support\Facades\Session; |
||||
use function GuzzleHttp\Promise\all; |
||||
|
||||
class GalleryController extends Controller |
||||
{ |
||||
protected $view = 'admin.gallery.'; |
||||
protected $redirect = 'admin/galleries'; |
||||
|
||||
public function index() |
||||
{ |
||||
$settings = Gallery::orderBy('id','DESC'); |
||||
|
||||
if(\request('name')){ |
||||
$key = \request('name'); |
||||
$settings = $settings->where('title','like','%'.$key.'%'); |
||||
} |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$settings = $settings->where('status',$key); |
||||
} |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create() |
||||
{ |
||||
return view($this->view . 'create'); |
||||
} |
||||
|
||||
public function store(Request $request) |
||||
{ |
||||
|
||||
|
||||
$this->validate(\request(), [ |
||||
|
||||
'seo_title' => 'nullable', |
||||
'seo_description' => 'nullable', |
||||
|
||||
'keyword' => 'required', |
||||
'meta-keyword' => 'nullable', |
||||
'status' => 'required', |
||||
'image' => 'required|file|mimes:jpeg,png,jpg,pdf' |
||||
]); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('gallery',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
|
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
|
||||
$requestData['slug'] = Setting::create_slug($requestData['keyword']); |
||||
$setting = Gallery::create($requestData); |
||||
|
||||
Session::flash('success','Gallery successfully created'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function show($id) |
||||
{ |
||||
$setting =Gallery::findorfail($id); |
||||
return view($this->view.'show',compact('setting')); |
||||
} |
||||
|
||||
public function edit($id){ |
||||
$setting =Gallery::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request, $id){ |
||||
|
||||
// dd(\request()->all()); |
||||
$setting =Gallery::findorfail($id); |
||||
$this->validate(\request(), [ |
||||
'seo_title' => 'nullable', |
||||
'seo_description' => 'nullable', |
||||
'keyword' => 'required', |
||||
'meta-keyword' => 'nullable', |
||||
'status' => 'required', |
||||
]); |
||||
|
||||
if(\request('image')){ |
||||
$this->validate(\request(),[ |
||||
'image' => 'file|mimes:jpeg,png,jpg,pdf' |
||||
]); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('gallery',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
$requestData = $request->all(); |
||||
$requestData['slug'] = Setting::create_slug($requestData['keyword']); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
|
||||
Session::flash('success','Gallery succesffuly updated.'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
public function delete($id){ |
||||
$setting=Gallery::findorfail($id); |
||||
|
||||
if($setting->delete()){ |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
Session::flash('success','Gallery is deleted !'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
// public function blog_point($blog_point_id) |
||||
// { |
||||
// if(Auth::user()){ |
||||
// $setting = BlogPoint::findorfail($blog_point_id); |
||||
// $setting->delete(); |
||||
// return response()->json(['blog_point_id' => $blog_point_id]); |
||||
// } |
||||
|
||||
// } |
||||
|
||||
} |
@ -0,0 +1,95 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Contact; |
||||
use App\Models\Referral; |
||||
use App\Models\Subscription; |
||||
use App\Models\Service; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Routing\Route; |
||||
use Illuminate\Support\Facades\Auth; |
||||
use Illuminate\Support\Facades\Session; |
||||
use Illuminate\Support\Facades\Hash; |
||||
|
||||
use App\Models\User; |
||||
|
||||
class HomeController extends Controller |
||||
{ |
||||
public function indexAdmin() |
||||
{ |
||||
if(Auth::check()){ |
||||
$service= Service::where('status',true); |
||||
$contact= Contact::all(); |
||||
$subscription= Contact::all(); |
||||
$contacts = Contact::paginate(config('custom.per_page')); |
||||
// $referrals=Referral::paginate(config('custom.per_page')); |
||||
return view('admin.index', compact( 'service', 'contact', 'contacts','subscription')); |
||||
} |
||||
return view('admin.login'); |
||||
} |
||||
|
||||
public function getLogin() |
||||
{ |
||||
if(Auth::check()){ |
||||
return redirect('admin/index'); |
||||
} |
||||
return view('admin.login'); |
||||
} |
||||
public function postLogin() |
||||
{ |
||||
$this->validate(request(),[ |
||||
'email'=>'required', |
||||
'password'=>'required', |
||||
]); |
||||
// dd(\request()->all()); |
||||
|
||||
|
||||
|
||||
if (Auth::attempt(['email'=>request('email'),'password'=>request('password')],request()->has('remember'))){ |
||||
return redirect('admin/index'); |
||||
} |
||||
// Session::flash('success','Invalid Credential!'); |
||||
return redirect('login')->withErrors(['Invalid Credentials!']); |
||||
} |
||||
|
||||
public function admin() |
||||
{ |
||||
if(Auth::check()){ |
||||
return view('admin.index'); |
||||
} |
||||
} |
||||
|
||||
public function getLogout() |
||||
{ |
||||
Auth::logout(); |
||||
return redirect('login'); |
||||
} |
||||
|
||||
public function change_password(){ |
||||
return view('admin.change_password_form'); |
||||
} |
||||
|
||||
public function update_password(Request $request){ |
||||
$request->validate([ |
||||
'old_password' => 'required', |
||||
'password' => 'required|min:8|confirmed', |
||||
]); |
||||
$user = auth()->user(); |
||||
|
||||
if(Hash::check($request->old_password,$user->password)){ |
||||
|
||||
$user = User::findorfail($user->id); |
||||
if($user->update(['password' => Hash::make($request->password)])){ |
||||
return redirect()->back()->with('success','Password is successfully updated.'); |
||||
} |
||||
} |
||||
return redirect()->back()->with('custom_error','Your old password is incorrect! Please try again.'); |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
||||
} |
@ -0,0 +1,184 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Academy; |
||||
use App\Models\NewsAndUpdate; |
||||
use App\Models\BlogPoint; |
||||
use App\Models\NewsAndUpdatePoint; |
||||
use App\Models\Setting; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Auth; |
||||
use Illuminate\Support\Facades\Session; |
||||
use function GuzzleHttp\Promise\all; |
||||
|
||||
class NewsAndUpdateController extends Controller |
||||
{ |
||||
protected $view = 'admin.news_and_update.'; |
||||
protected $redirect = 'admin/news_and_updates'; |
||||
|
||||
public function index() |
||||
{ |
||||
$settings = NewsAndUpdate::orderBy('id','DESC'); |
||||
|
||||
if(\request('name')){ |
||||
$key = \request('name'); |
||||
$settings = $settings->where('title','like','%'.$key.'%'); |
||||
} |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$settings = $settings->where('status',$key); |
||||
} |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create() |
||||
{ |
||||
return view($this->view . 'create'); |
||||
} |
||||
|
||||
public function store(Request $request) |
||||
{ |
||||
|
||||
|
||||
$this->validate(\request(), [ |
||||
'description' => 'required', |
||||
// 'bottom_description' => 'required', |
||||
'seo_title' => 'nullable', |
||||
'seo_description' => 'nullable', |
||||
'publish_date' =>'required', |
||||
'keyword' => 'required', |
||||
'meta-keyword' => 'nullable', |
||||
'status' => 'required', |
||||
'image' => 'required|file|mimes:jpeg,png,jpg,pdf' |
||||
]); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('news_and_update',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
|
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
|
||||
$requestData['slug'] = Setting::create_slug($requestData['keyword']); |
||||
$requestData['blog_type'] =1; |
||||
$setting = NewsAndUpdate::create($requestData); |
||||
if(\request('point_title')){ |
||||
foreach (\request('point') as $index => $value){ |
||||
$setting_point = new NewsAndUpdatePoint(); |
||||
$setting_point->news_and_update_id = $setting->id; |
||||
$setting_point->point = $value; |
||||
$setting_point->save(); |
||||
} |
||||
} |
||||
Session::flash('success','Blog successfully created'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function show($id) |
||||
{ |
||||
$setting =NewsAndUpdate::findorfail($id); |
||||
return view($this->view.'show',compact('setting')); |
||||
} |
||||
|
||||
public function edit($id){ |
||||
$setting =NewsAndUpdate::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request, $id){ |
||||
|
||||
// dd(\request()->all()); |
||||
$setting =NewsAndUpdate::findorfail($id); |
||||
$this->validate(\request(), [ |
||||
'description' => 'required', |
||||
'seo_title' => 'nullable', |
||||
'seo_description' => 'nullable', |
||||
'keyword' => 'required', |
||||
'meta-keyword' => 'nullable', |
||||
'status' => 'required', |
||||
'publish_date'=>'required', |
||||
]); |
||||
|
||||
if(\request('image')){ |
||||
$this->validate(\request(),[ |
||||
'image' => 'file|mimes:jpeg,png,jpg,pdf' |
||||
]); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('news_and_update',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
$requestData = $request->all(); |
||||
$requestData['slug'] = Setting::create_slug($requestData['keyword']); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
$requestData['blog_type'] =1; |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
if(\request('point_title') ){ |
||||
if(\request('point')){ |
||||
foreach (\request('point') as $index => $value){ |
||||
$setting_point = new NewsAndUpdatePoint(); |
||||
$setting_point->news_and_update_id = $setting->id; |
||||
$setting_point->point = $value; |
||||
$setting_point->save(); |
||||
} |
||||
} |
||||
if(\request('point_old_id')){ |
||||
foreach (\request('point_old_id') as $in => $value1){ |
||||
$setting_point_update = NewsAndUpdatePoint::findOrFail($value1); |
||||
$setting_point_update->news_and_update_id = $setting->id; |
||||
$setting_point_update->point = \request('point_old')[$in]; |
||||
$setting_point_update->save(); |
||||
} |
||||
} |
||||
|
||||
} |
||||
Session::flash('success','News and Update succesfully edited.'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
public function delete($id){ |
||||
$setting=NewsAndUpdate::findorfail($id); |
||||
if($setting->news_and_update_points->count() > 0){ |
||||
$setting->news_and_update_points()->delete(); |
||||
} |
||||
if($setting->delete()){ |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
Session::flash('success','News and Update is deleted !'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function blog_point($blog_point_id) |
||||
{ |
||||
if(Auth::user()){ |
||||
$setting = BlogPoint::findorfail($blog_point_id); |
||||
$setting->delete(); |
||||
return response()->json(['blog_point_id' => $blog_point_id]); |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,121 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use Illuminate\Http\Request; |
||||
use App\Models\Partner; |
||||
use App\Models\User; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class PartnerController extends Controller |
||||
{ |
||||
protected $view = 'admin.partner.'; |
||||
protected $redirect = 'admin/partners'; |
||||
public function index() |
||||
{ |
||||
$settings = Partner::orderBy('id','DESC'); |
||||
// if(\request('title')){ |
||||
// $key = \request('title1'); |
||||
// $settings = $settings->where('title1','like','%'.$key.'%'); |
||||
// } |
||||
// if(\request('status')){ |
||||
// $key = \request('status'); |
||||
// $settings = $settings->where('status',$key); |
||||
// } |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
public function store(Request $request) |
||||
{ |
||||
|
||||
|
||||
$this->validate(\request(), [ |
||||
|
||||
// 'title' => 'required', |
||||
'status' => 'required', |
||||
'image' => 'required|file|mimes:jpeg,png,jpg' |
||||
]); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('partner',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
|
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
|
||||
// $requestData['slug'] = Setting::create_slug($requestData['keyword']); |
||||
$setting = Partner::create($requestData); |
||||
|
||||
Session::flash('success','Partner successfully created'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function edit($id) |
||||
{ |
||||
$setting = Partner::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request, $id){ |
||||
|
||||
$setting =Partner::findorfail($id); |
||||
$this->validate(\request(), [ |
||||
// 'name' => 'required', |
||||
'status' => 'required', |
||||
'image' => 'file|mimes:jpeg,png,jpg,pdf' |
||||
]); |
||||
|
||||
if(\request('image')){ |
||||
$this->validate(\request(),[ |
||||
'image' => 'file|mimes:jpeg,png,jpg,pdf' |
||||
]); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('partner',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
$requestData = $request->all(); |
||||
// $requestData['slug'] = Setting::create_slug($requestData['keyword']); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
|
||||
Session::flash('success','Partner succesffuly updated.'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
public function delete($id){ |
||||
$setting=Partner::findorfail($id); |
||||
|
||||
if($setting->delete()){ |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
Session::flash('success','Partner is deleted !'); |
||||
return redirect($this->redirect); |
||||
} |
||||
} |
@ -0,0 +1,33 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Referral; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class ReferralController extends Controller |
||||
{ |
||||
protected $view='admin.referral.'; |
||||
protected $redirect='admin/referrals'; |
||||
public function index(){ |
||||
$settings=Referral::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function show($id){ |
||||
|
||||
$referral=Referral::findorfail($id); |
||||
return view($this->view.'show',compact('referral')); |
||||
|
||||
} |
||||
} |
@ -0,0 +1,66 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\SeoTitle; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class SeoTitleController extends Controller |
||||
{ |
||||
protected $view = 'admin.seo_title.'; |
||||
protected $redirect = 'admin/seo_titles'; |
||||
|
||||
public function index(){ |
||||
$settings = SeoTitle::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
|
||||
} |
||||
public function create(){ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
public function store(Request $request){ |
||||
|
||||
$this->validate(\request(),[ |
||||
'seo_type'=>'required', |
||||
'status' => 'required' |
||||
]); |
||||
$requestData = $request->all(); |
||||
$setting = SeoTitle::create($requestData); |
||||
|
||||
Session::flash('success','SEO Type is created'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function edit($id){ |
||||
$setting = SeoTitle::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request ,$id){ |
||||
$setting = SeoTitle::findorfail($id); |
||||
|
||||
$this->validate(\request(),[ |
||||
'seo_type'=>'required', |
||||
'status' => 'required' |
||||
]); |
||||
$requestData = $request->all(); |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
|
||||
Session::flash('success','Seo Title is Updated'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function delete($id){ |
||||
|
||||
$setting=SeoTitle::findorfail($id); |
||||
$setting->delete(); |
||||
Session::flash('success','Seo Title is deleted !'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
// |
||||
} |
@ -0,0 +1,241 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Service; |
||||
use App\Models\ServicePoint; |
||||
use App\Models\Setting; |
||||
use Illuminate\Http\Request; |
||||
use App\Models\User; |
||||
use Illuminate\Support\Facades\Auth; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class ServiceController extends Controller |
||||
{ |
||||
/** |
||||
* Display a listing of the resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
|
||||
protected $view = 'admin.service.'; |
||||
protected $redirect = 'admin/services'; |
||||
|
||||
public function index() |
||||
{ |
||||
$services = Service::orderBy('order_by','ASC'); |
||||
|
||||
if(\request('name')){ |
||||
$key = \request('name'); |
||||
$services = $services->where('name','like','%'.$key.'%'); |
||||
} |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$services = $services->where('status',$key); |
||||
} |
||||
$services = $services->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('services')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for creating a new resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
/** |
||||
* Store a newly created resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function store(Request $request) |
||||
{ |
||||
|
||||
$this->validate(\request(),[ |
||||
'name' => 'required', |
||||
'seo_title' => 'required', |
||||
'short_description' => 'required', |
||||
'keywords'=>'required', |
||||
'icon' => 'file|mimes:jpeg,png,jpg,svg,' |
||||
]); |
||||
$service = new Service(); |
||||
$service->name = \request('name'); |
||||
// $service->image = \request('image'); |
||||
// $service->image_title = \request('image_title'); |
||||
// $service->top_description = \request('top_description'); |
||||
// $service->image_description = \request('image_description'); |
||||
// $service->bottom_description = \request('bottom_description'); |
||||
$service->seo_description = strip_tags(\request('seo_description')); |
||||
$service->seo_title = \request('seo_title'); |
||||
$service->keywords = \request('keywords'); |
||||
// $service->icon = \request('icon'); |
||||
$service->meta_keywords = strip_tags(\request('meta_keywords')); |
||||
$service->short_description = strip_tags(\request('short_description')); |
||||
// $service->point_title = \request('point_title'); |
||||
// $service->description_title = \request('description_title'); |
||||
$service->status = \request('status'); |
||||
$service->order_by = \request('order_by'); |
||||
// $service->image_alt = \request('image_alt'); |
||||
$service->slug = Setting::create_slug(\request('seo_title')); |
||||
|
||||
|
||||
if($request->hasFile('icon')){ |
||||
$extension = \request()->file('icon')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||
|
||||
$count = rand(100,999); |
||||
|
||||
$out_put_path = User::save_image(\request('icon'),$extension,$count,$image_folder_type); |
||||
is_array($out_put_path) ? $service->icon = $out_put_path[0] : $service->icon = $out_put_path; |
||||
} |
||||
|
||||
|
||||
if($service->save()){ |
||||
// $points = $request->points; |
||||
// foreach($points as $point){ |
||||
// $service_point = new ServicePoint(); |
||||
// $service_point->service_id = $service->id; |
||||
// $service_point->point = $point; |
||||
// $service_point->save(); |
||||
// } |
||||
Session::flash('success','Service has been created!'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* Display the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function show($id) |
||||
{ |
||||
$service = new Service(); |
||||
|
||||
|
||||
$service = $service->findorfail($id); |
||||
|
||||
|
||||
return view($this->view . 'show', compact('service')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for editing the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function edit($id) |
||||
{ |
||||
$service = new Service(); |
||||
|
||||
|
||||
$service = $service->findorfail($id); |
||||
|
||||
|
||||
return view($this->view . 'edit', compact('service')); |
||||
} |
||||
|
||||
/** |
||||
* Update the specified resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function update(Request $request, $id) |
||||
{ |
||||
$this->validate(\request(),[ |
||||
|
||||
'name' => 'required', |
||||
'short_description' => 'required', |
||||
'seo_title' => 'required', |
||||
'keywords'=>'required', |
||||
|
||||
]); |
||||
$service = new Service(); |
||||
$service = $service->findorfail($id); |
||||
$service->name = \request('name'); |
||||
$service->short_description = \request('short_description'); |
||||
$service->seo_description = \request('seo_description'); |
||||
$service->seo_title = \request('seo_title'); |
||||
$service->keywords = \request('keywords'); |
||||
|
||||
$service->meta_keywords = \request('meta_keywords'); |
||||
$service->status = \request('status'); |
||||
$service->order_by = \request('order_by'); |
||||
$service->slug = Setting::create_slug(\request('seo_title')); |
||||
|
||||
if($request->hasFile('icon')){ |
||||
|
||||
$extension = \request()->file('icon')->getClientOriginalExtension(); |
||||
|
||||
$image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('icon'),$extension,$count,$image_folder_type); |
||||
|
||||
|
||||
if (is_file(public_path().'/'.$service->icon) && file_exists(public_path().'/'.$service->icon)){ |
||||
unlink(public_path().'/'.$service->icon); |
||||
} |
||||
is_array($out_put_path) ? $service->icon = $out_put_path[0] : $service->icon = $out_put_path; |
||||
|
||||
|
||||
} |
||||
if($service->update()){ |
||||
Session::flash('success','Service has been successfully updated!'); |
||||
return redirect($this->redirect); |
||||
// $service_point = $service->service_point(); |
||||
// $service_point->delete(); |
||||
// $points = $request->points; |
||||
// foreach($points as $point){ |
||||
// $service_point = new ServicePoint(); |
||||
// $service_point->service_id = $service->id; |
||||
// $service_point->point = $point; |
||||
// $service_point->save(); |
||||
|
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
/** |
||||
* Remove the specified resource from storage. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function delete($id) |
||||
{ |
||||
$setting=Service::findorfail($id); |
||||
if (is_file(public_path().'/'.$setting->icon) && file_exists(public_path().'/'.$setting->icon)){ |
||||
unlink(public_path().'/'.$setting->icon); |
||||
} |
||||
$setting->delete(); |
||||
Session::flash('success','Service has been sucessfully deleted!'); |
||||
return redirect($this->redirect); |
||||
//dd("here"); |
||||
} |
||||
|
||||
|
||||
public function service_point($service_point_id){ |
||||
if(Auth::user()){ |
||||
$setting = ServicePoint::findorfail($service_point_id); |
||||
$setting->delete(); |
||||
return response()->json(['service_point_id' => $service_point_id]); |
||||
} |
||||
|
||||
} |
||||
} |
@ -0,0 +1,66 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Service; |
||||
use App\Models\ServiceOld; |
||||
use App\Models\ServiceFaq; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class ServiceFaqController extends Controller |
||||
{ |
||||
protected $view= 'admin.service_faq.'; |
||||
protected $redirect = 'admin/service_faqs'; |
||||
|
||||
|
||||
public function index(){ |
||||
$settings = ServiceFaq::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create(){ |
||||
$settings = Service::get(); |
||||
return view($this->view.'create',compact('settings')); |
||||
} |
||||
|
||||
public function store(Request $request){ |
||||
$this->validate(\request(), [ |
||||
'question' =>'required|string', |
||||
'answer'=>'required', |
||||
'status' => 'required', |
||||
|
||||
]); |
||||
|
||||
$requestData = $request->all(); |
||||
$setting = ServiceFaq::create($requestData); |
||||
Session::flash('success','ServiceFAQ is created'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
public function edit($id){ |
||||
$setting = ServiceFaq::findorfail($id); |
||||
$services = Service::all(); |
||||
return view($this->view.'edit',compact('setting'),compact('services')); |
||||
} |
||||
|
||||
public function update(Request $request, $id){ |
||||
|
||||
$setting =ServiceFaq::findorfail($id); |
||||
$this->validate(\request(), [ |
||||
'question' =>'required|string', |
||||
'answer'=>'required', |
||||
'status' => 'required', |
||||
|
||||
]); |
||||
|
||||
$requestData = $request->all(); |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
Session::flash('success','CourseFAQ is Updated'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
} |
@ -0,0 +1,285 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Service; |
||||
use App\Models\ServiceSection; |
||||
use App\Models\ServiceSectionPoint; |
||||
use App\Models\Setting; |
||||
use Illuminate\Http\Request; |
||||
use App\Models\User; |
||||
use Illuminate\Support\Facades\Auth; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class ServiceSectionController extends Controller |
||||
{ |
||||
/** |
||||
* Display a listing of the resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
|
||||
protected $view = 'admin.service_section.'; |
||||
protected $redirect = 'admin/services/{id}/sections'; |
||||
|
||||
public function index($id) |
||||
{ |
||||
$service_name = Service::findorfail($id)->name; |
||||
$service_section = ServiceSection::where('service_id',$id); |
||||
|
||||
|
||||
// if(\request('name')){ |
||||
// $key = \request('name'); |
||||
// $services = $services->where('name','like','%'.$key.'%'); |
||||
// } |
||||
// if(\request('status')){ |
||||
// $key = \request('status'); |
||||
// $services = $services->where('status',$key); |
||||
// } |
||||
$service_sections = $service_section->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('service_sections','service_name','id')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for creating a new resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function create($id) |
||||
{ |
||||
$service_name = Service::findorfail($id)->name; |
||||
return view($this->view.'create',compact('service_name','id')); |
||||
} |
||||
|
||||
/** |
||||
* Store a newly created resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function store(Request $request,$id) |
||||
{ |
||||
|
||||
|
||||
$this->validate(\request(),[ |
||||
|
||||
'title' => 'required', |
||||
'status' => 'required', |
||||
'order_by' => 'required' |
||||
|
||||
]); |
||||
$service_section = new ServiceSection(); |
||||
|
||||
$service_section->title = \request('title'); |
||||
$service_section->sub_title = \request('sub_title'); |
||||
$service_section->description = strip_tags(\request('description')); |
||||
$service_section->sub_description = strip_tags(\request('sub_description')); |
||||
$service_section->service_id = $id; |
||||
$service_section->status = \request('status'); |
||||
$service_section->order_by = \request('order_by'); |
||||
// $service->image_alt = \request('image_alt'); |
||||
// $service->slug = Setting::create_slug(\request('seo_title')); |
||||
|
||||
|
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||
// dd($image_folder_type); |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path = $out_put_path[0]; |
||||
$service_section->image = $image_path; |
||||
} |
||||
|
||||
|
||||
if($service_section->save()){ |
||||
$points = $request->points; |
||||
$point_descriptions = $request->point_descriptions ?? []; |
||||
$icons = $request->icons ?? []; |
||||
|
||||
if($points[0] != null){ |
||||
|
||||
foreach($points as $key => $point){ |
||||
|
||||
$service_section_point = new ServiceSectionPoint(); |
||||
|
||||
$service_section_point->service_section_id = $service_section->id; |
||||
if(array_key_exists($key,$point_descriptions)){ |
||||
$service_section_point->point_description = $point_descriptions[$key]; |
||||
} |
||||
if(array_key_exists($key,$icons)){ |
||||
$extension = $icons[$key]->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||
|
||||
$count = rand(100,999); |
||||
|
||||
$out_put_path = User::save_image($icons[$key],$extension,$count,$image_folder_type); |
||||
is_array($out_put_path) ? $service_section_point->icon = $out_put_path[0] : $service_section_point->icon = $out_put_path; |
||||
// $service_section_point->icon = $points_descriptions[$key]; |
||||
} |
||||
$service_section_point->point = $point; |
||||
$service_section_point->save(); |
||||
} |
||||
} |
||||
Session::flash('success','Service Section has has been created!'); |
||||
return redirect('admin/services/'.$id.'/sections'); |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* Display the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function show($id,$secId) |
||||
{ |
||||
|
||||
|
||||
// $service = new Service(); |
||||
// $service_section = new ServiceSection(); |
||||
$service = Service::findorfail($id); |
||||
|
||||
$service_section = ServiceSection::findorfail($secId); |
||||
|
||||
|
||||
|
||||
return view($this->view . 'show', compact('service','service_section')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for editing the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function edit($id,$secId) |
||||
{ |
||||
$service = new Service(); |
||||
$service_section = new ServiceSection(); |
||||
$service = $service->findorfail($id); |
||||
$service_section = $service_section->findorfail($secId); |
||||
|
||||
|
||||
|
||||
|
||||
return view($this->view . 'edit', compact('service','service_section')); |
||||
} |
||||
|
||||
/** |
||||
* Update the specified resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function update(Request $request, $id, $secId) |
||||
{ |
||||
$this->validate(\request(),[ |
||||
'title' => 'required', |
||||
'status' => 'required', |
||||
'order_by' => 'required' |
||||
]); |
||||
$service_section = ServiceSection::findOrFail($secId); |
||||
$service_section->title = \request('title'); |
||||
$service_section->sub_title = \request('sub_title'); |
||||
$service_section->description = strip_tags(\request('description')); |
||||
$service_section->sub_description = strip_tags(\request('sub_description')); |
||||
$service_section->service_id = $id; |
||||
$service_section->status = \request('status'); |
||||
$service_section->order_by = \request('order_by'); |
||||
|
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path = $out_put_path[0]; |
||||
if (is_file(public_path().'/'.$service_section->image) && file_exists(public_path().'/'.$service_section->image)){ |
||||
unlink(public_path().'/'.$service_section->image); |
||||
} |
||||
$service_section->image = $image_path; |
||||
} |
||||
if($service_section->update()){ |
||||
$points = $request->points; |
||||
$point_descriptions = $request->point_descriptions ?? []; |
||||
$icons = $request->icons ?? []; |
||||
|
||||
|
||||
if($points[0] != null){ |
||||
foreach($request['point_ids'] as $key => $pid){ |
||||
$service_section_point = new ServiceSectionPoint(); |
||||
$service_section_point = $service_section_point->findorfail($pid); |
||||
// $service_section_point = ServiceSectionPoint::find($id); |
||||
|
||||
if(array_key_exists($key,$point_descriptions)){ |
||||
$service_section_point->point_description = $point_descriptions[$key]; |
||||
} |
||||
if(array_key_exists($key,$icons)){ |
||||
$extension = $icons[$key]->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||
|
||||
$count = rand(100,999); |
||||
|
||||
$out_put_path = User::save_image($icons[$key],$extension,$count,$image_folder_type); |
||||
is_array($out_put_path) ? $service_section_point->icon = $out_put_path[0] : $service_section_point->icon = $out_put_path; |
||||
// $service_section_point->icon = $points_descriptions[$key]; |
||||
} |
||||
$service_section_point->point = $points[$key]; |
||||
$service_section_point->update(); |
||||
|
||||
} |
||||
// $service_point = $service_section->service_section_point(); |
||||
// $service_point->delete(); |
||||
// foreach($points as $key => $point){ |
||||
|
||||
// $service_section_point = new ServiceSectionPoint(); |
||||
// $service_section_point->service_section_id = $service_section->id; |
||||
// if(array_key_exists($key,$point_descriptions)){ |
||||
// $service_section_point->point_description = $point_descriptions[$key]; |
||||
// } |
||||
// if(array_key_exists($key,$icons)){ |
||||
// $extension = $icons[$key]->getClientOriginalExtension(); |
||||
// $image_folder_type = array_search('service',config('custom.image_folders')); //for image saved in folder |
||||
|
||||
// $count = rand(100,999); |
||||
|
||||
// $out_put_path = User::save_image($icons[$key],$extension,$count,$image_folder_type); |
||||
// is_array($out_put_path) ? $service_section_point->icon = $out_put_path[0] : $service_section_point->icon = $out_put_path; |
||||
// // $service_section_point->icon = $points_descriptions[$key]; |
||||
// } |
||||
// $service_section_point->point = $point; |
||||
// $service_section_point->update(); |
||||
// } |
||||
} |
||||
Session::flash('success','Service Section has been successfully updated!'); |
||||
return redirect('admin/services/'.$id.'/sections'); |
||||
|
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
/** |
||||
* Remove the specified resource from storage. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function destroy($id) |
||||
{ |
||||
// |
||||
} |
||||
|
||||
public function service_point($service_point_id){ |
||||
if(Auth::user()){ |
||||
$setting = ServiceSectionPoint::findorfail($service_point_id); |
||||
$setting->delete(); |
||||
return response()->json(['service_point_id' => $service_point_id]); |
||||
} |
||||
|
||||
} |
||||
} |
@ -0,0 +1,182 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Http\Resources\SettingResource; |
||||
use App\Models\Setting; |
||||
use App\Models\SettingImageAlt; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class SettingController extends Controller |
||||
{ |
||||
|
||||
protected $view = 'admin.setting.'; |
||||
protected $redirect = 'admin/settings'; |
||||
|
||||
public function index() |
||||
{ |
||||
$settings = Setting::orderBy('id','asc'); |
||||
|
||||
|
||||
if(\request('name')){ |
||||
$key = \request('name'); |
||||
$settings = $settings->where('key','like','%'.$key.'%'); |
||||
} |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$settings = $settings->where('status',$key); |
||||
} |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
public function store(Request $request) |
||||
{ |
||||
|
||||
$this->validate(\request(),[ |
||||
'type' => 'required', |
||||
'key' => 'required', |
||||
'value' => 'required', |
||||
'status' => 'required' |
||||
]); |
||||
|
||||
$setting = new Setting(); |
||||
|
||||
$setting->key = \request('key'); |
||||
$setting->type = \request('type'); |
||||
$setting->status = \request('status'); |
||||
$setting->slug = Setting::create_slug(\request('key')); |
||||
if(request('type') == array_search('Image',config('custom.setting_types'))){ |
||||
$this->validate($request,[ |
||||
'value'=>'required|file|mimes:jpeg,png,jpg,pdf' |
||||
] |
||||
); |
||||
|
||||
if($request->hasFile('value')){ |
||||
$extension = \request()->file('value')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('setting',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('value'),$extension,$count,$image_folder_type); |
||||
$image_path = $out_put_path[0]; |
||||
$setting->value = $image_path; |
||||
} |
||||
|
||||
}else{ |
||||
$setting->value = \request('value'); |
||||
} |
||||
$setting->save(); |
||||
if(\request('image_alt')){ |
||||
$image_alt = new SettingImageAlt(); |
||||
$image_alt->setting_id = $setting->id; |
||||
$image_alt->image_alt = \request('image_alt'); |
||||
$image_alt->save(); |
||||
} |
||||
Session::flash('success','Setting has been created!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function getAll() |
||||
{ |
||||
$settings = Setting::all(); |
||||
return SettingResource::collection(Setting::all()); |
||||
} |
||||
|
||||
public function getSetting() |
||||
{ |
||||
$slug = \request('slug'); |
||||
$setting = Setting::where('slug',$slug)->where('status',1)->first(); |
||||
return new SettingResource($setting); |
||||
} |
||||
|
||||
public function show($id) |
||||
{ |
||||
$setting = Setting::findOrFail($id); |
||||
return view($this->view.'show',compact('setting')); |
||||
} |
||||
|
||||
public function edit($id) |
||||
{ |
||||
$setting = Setting::findOrFail($id); |
||||
// dd(array_search('Image',config('custom.setting_types'))); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request, $id) |
||||
{ |
||||
$this->validate(\request(),[ |
||||
'type' => 'required', |
||||
'key' => 'required', |
||||
'status' => 'required' |
||||
]); |
||||
$setting = Setting::findOrFail($id); |
||||
$setting->key = \request('key'); |
||||
$setting->type = \request('type'); |
||||
$setting->status = \request('status'); |
||||
$setting->slug = Setting::create_slug(\request('key')); |
||||
if(request('type') == array_search('Image',config('custom.setting_types'))){ |
||||
if(\request('value')){ |
||||
$this->validate($request,[ |
||||
'value'=>'required|file|mimes:jpeg,png,jpg,pdf' |
||||
] |
||||
); |
||||
|
||||
if($request->hasFile('value')){ |
||||
$extension = \request()->file('value')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('setting',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('value'),$extension,$count,$image_folder_type); |
||||
$image_path = $out_put_path[0]; |
||||
$setting->value = $image_path; |
||||
} |
||||
} |
||||
|
||||
|
||||
}else{ |
||||
$this->validate($request,[ |
||||
'value'=>'required' |
||||
] |
||||
); |
||||
$setting->value = \request('value'); |
||||
} |
||||
$setting->save(); |
||||
if(\request('image_alt')){ |
||||
if($setting->setting_alt){ |
||||
$image_alt = $setting->setting_alt; |
||||
$image_alt->setting_id = $setting->id; |
||||
$image_alt->image_alt = \request('image_alt'); |
||||
$image_alt->save(); |
||||
}else{ |
||||
$image_alt = new SettingImageAlt(); |
||||
$image_alt->setting_id = $setting->id; |
||||
$image_alt->image_alt = \request('image_alt'); |
||||
$image_alt->save(); |
||||
} |
||||
}else{ |
||||
if($setting->setting_alt){ |
||||
$setting->setting_alt->delete(); |
||||
} |
||||
} |
||||
Session::flash('success','Setting has been created!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function delete($id) |
||||
{ |
||||
$setting=Setting::findorfail($id); |
||||
if (is_file(public_path().'/'.$setting->value) && file_exists(public_path().'/'.$setting->value)){ |
||||
unlink(public_path().'/'.$setting->value); |
||||
} |
||||
$setting->delete(); |
||||
Session::flash('success','Setting has been sucessfully deleted!'); |
||||
return redirect($this->redirect); |
||||
//dd("here"); |
||||
} |
||||
} |
@ -0,0 +1,185 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Http\Resources\SliderResource; |
||||
use App\Models\Slider; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class SliderController extends Controller |
||||
{ |
||||
/** |
||||
* Display a listing of the resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
|
||||
protected $view = 'admin.slider.'; |
||||
protected $redirect = 'admin/sliders'; |
||||
public function index() |
||||
{ |
||||
$settings = Slider::orderBy('id','DESC'); |
||||
if(\request('title1')){ |
||||
$key = \request('title1'); |
||||
$settings = $settings->where('title1','like','%'.$key.'%'); |
||||
} |
||||
if(\request('status')){ |
||||
$key = \request('status'); |
||||
$settings = $settings->where('status',$key); |
||||
} |
||||
$settings = $settings->paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
/** |
||||
* Show the form for creating a new resource. |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
/** |
||||
* Store a newly created resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function store(Request $request) |
||||
{ |
||||
$this->validate(\request(),[ |
||||
'title1' => 'required', |
||||
// 'title2' => 'required', |
||||
// 'description' => 'required', |
||||
'image' => 'required|file|mimes:jpeg,png,jpg', |
||||
'status' => 'required' |
||||
]); |
||||
|
||||
$setting = new Slider(); |
||||
|
||||
$setting->title1 = \request('title1'); |
||||
$setting->title2 = \request('title2'); |
||||
$setting->description = \request('description'); |
||||
$setting->status = \request('status'); |
||||
$setting->link = \request('link'); |
||||
$setting->image_alt = \request('image_alt'); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('slider',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
if($extension == "jpeg" || $extension == "jpg" || $extension == "png"){ |
||||
$image_path = $out_put_path[0]; |
||||
$setting->image = $image_path; |
||||
// $setting->doc_name = $out_put_path[2]; |
||||
} |
||||
} |
||||
|
||||
$setting->save(); |
||||
Session::flash('success','Slider has been created!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
/** |
||||
* Display the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function show($id) |
||||
{ |
||||
// |
||||
} |
||||
|
||||
/** |
||||
* Show the form for editing the specified resource. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function edit($id) |
||||
{ |
||||
$setting = Slider::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
/** |
||||
* Update the specified resource in storage. |
||||
* |
||||
* @param \Illuminate\Http\Request $request |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function update(Request $request, $id) |
||||
{ |
||||
$setting=Slider::findorfail($id); |
||||
|
||||
$this->validate(\request(),[ |
||||
'title1' => 'required', |
||||
// 'title1' => 'required', |
||||
// 'title2' => 'required', |
||||
// 'description' => 'required', |
||||
'image' => 'file|mimes:jpeg,png,jpg', |
||||
'status' => 'required' |
||||
]); |
||||
|
||||
|
||||
|
||||
$setting->title1 = \request('title1'); |
||||
$setting->title2 = \request('title2'); |
||||
$setting->description = \request('description'); |
||||
$setting->status = \request('status'); |
||||
$setting->link = \request('link'); |
||||
$setting->image_alt = \request('image_alt'); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('slider',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
|
||||
$image_path = $out_put_path[0]; |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
if(isset($image_path)){ |
||||
$setting->image = $image_path; |
||||
|
||||
} |
||||
|
||||
// $setting->doc_name = $out_put_path[2]; |
||||
} |
||||
// $requestData = $request->all(); |
||||
// $setting->fill($requestData); |
||||
$setting->update(); |
||||
Session::flash('success','Slider has been Updated!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
/** |
||||
* Remove the specified resource from storage. |
||||
* |
||||
* @param int $id |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function destroy($id) |
||||
{ |
||||
$slider=Slider::findorfail($id); |
||||
if (is_file(public_path().'/'.$slider->image) && file_exists(public_path().'/'.$slider->image)){ |
||||
unlink(public_path().'/'.$slider->image); |
||||
} |
||||
$slider->delete(); |
||||
Session::flash('success','Slider has been sucessfully deleted!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function getSliders(){ |
||||
|
||||
$settings = Slider::where('status',1)->get(); |
||||
// return SliderResource::collection($settings); |
||||
} |
||||
} |
@ -0,0 +1,98 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\SubOffice; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class SubOfficeController extends Controller |
||||
{ |
||||
protected $view='admin.sub_office.'; |
||||
protected $redirect='admin/sub_offices'; |
||||
public function index(){ |
||||
$settings = SubOffice::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create(){ |
||||
|
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
public function store(Request $request){ |
||||
|
||||
$this->validate(\request(),[ |
||||
'name'=>'required|string', |
||||
'image' => 'required|file|mimes:jpeg,png,jpg,pdf', |
||||
'email'=>'required', |
||||
'latitude' => 'required', |
||||
'longitude' => 'required', |
||||
'contact_no'=>'required' |
||||
]); |
||||
|
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('sub_office',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
$requestData=$request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
$setting= SubOffice::create($requestData); |
||||
Session::flash('success','Blog is created'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
|
||||
public function edit($id){ |
||||
$setting=SubOffice::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request , $id){ |
||||
$setting= SubOffice::findorfail($id); |
||||
|
||||
$this->validate(\request(),[ |
||||
'name'=>'required|string', |
||||
'image' => 'file|mimes:jpeg,png,jpg,pdf', |
||||
'email'=>'required', |
||||
'contact_no'=>'required', |
||||
'latitude' => 'required', |
||||
'longitude' => 'required' |
||||
]); |
||||
|
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('sub_office',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
|
||||
$requestData= $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
Session::flash('success','Suboffice is Updated'); |
||||
return redirect($this->redirect); |
||||
|
||||
|
||||
} |
||||
|
||||
public function delete($id){ |
||||
|
||||
$setting=SubOffice::findorfail($id); |
||||
$setting->delete(); |
||||
Session::flash('success','Suboffice is deleted !'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
} |
@ -0,0 +1,49 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Subscription; |
||||
use Illuminate\Http\Request; |
||||
use App\Models\User; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class SubscriptionController extends Controller |
||||
{ |
||||
protected $view='admin.subscription.'; |
||||
protected $redirect='admin/subscriptions'; |
||||
|
||||
public function index(){ |
||||
$subscriptions=Subscription::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('subscriptions')); |
||||
} |
||||
|
||||
public function show($id){ |
||||
|
||||
$subscription = new Subscription(); |
||||
$subscription = $subscription->findorfail($id); |
||||
return view($this->view . 'show', compact('subscription')); |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function delete($id){ |
||||
$setting=Placement::findorfail($id); |
||||
if($setting->delete()){ |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
Session::flash('success','Placement is deleted !'); |
||||
return redirect($this->redirect); |
||||
|
||||
} |
||||
// |
||||
} |
@ -0,0 +1,93 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Team; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
class TeamController extends Controller |
||||
{ |
||||
// |
||||
|
||||
protected $view = 'admin.team.'; |
||||
protected $return = 'admin/teams'; |
||||
|
||||
public function index(){ |
||||
$settings = Team::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create(){ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
public function edit($id){ |
||||
$team = Team::findorfail($id); |
||||
return view($this->view.'edit',compact('team')); |
||||
} |
||||
|
||||
public function store(Request $request){ |
||||
//dd($request); |
||||
$this->validate(\request(),[ |
||||
'team_name'=>'required', |
||||
'designation'=>'required', |
||||
|
||||
'status'=>'required' |
||||
]); |
||||
|
||||
$requestData = $request->all(); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('team',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
|
||||
Team::create($requestData); |
||||
Session::flash('success','Team is created'); |
||||
return redirect($this->return); |
||||
|
||||
} |
||||
|
||||
public function update(Request $request ,$id){ |
||||
//dd($request); |
||||
$setting = Team::findorfail($id); |
||||
|
||||
$this->validate(\request(),[ |
||||
'team_name'=>'required', |
||||
'designation'=>'required', |
||||
'status'=>'required', |
||||
'image' => 'file|mimes:jpeg,png,jpg' |
||||
]); |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('team',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
} |
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
Session::flash('success','Team is Updated'); |
||||
return redirect($this->return); |
||||
|
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,116 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers\Admin; |
||||
|
||||
use App\Http\Controllers\Controller; |
||||
use App\Models\Testimonial; |
||||
use App\Models\Testimonial as Setting; |
||||
use App\Models\User; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Session; |
||||
|
||||
|
||||
class TestimonialController extends Controller |
||||
{ |
||||
|
||||
protected $view = 'admin.testimonial.'; |
||||
protected $redirect = 'admin/testimonials'; |
||||
|
||||
public function index() |
||||
{ |
||||
$settings = Testimonial::paginate(config('custom.per_page')); |
||||
return view($this->view.'index',compact('settings')); |
||||
} |
||||
|
||||
public function create() |
||||
{ |
||||
return view($this->view.'create'); |
||||
} |
||||
|
||||
public function store(Request $request) |
||||
{ |
||||
$this->validate(\request(),[ |
||||
|
||||
'heading' =>'required', |
||||
// 'title' =>'required', |
||||
'image' =>'required|file|mimes:jpeg,png,jpg,pdf', |
||||
'review' =>'required', |
||||
'author_name' =>'required', |
||||
'author_designation' =>'required', |
||||
'status' =>'required', |
||||
|
||||
]); |
||||
|
||||
if(\request('image')){ |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('testimonial',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
} |
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
$requestData['review'] = strip_tags($request['review']); |
||||
Setting::create($requestData); |
||||
Session::flash('success','Testimonial is created!'); |
||||
return redirect($this->redirect); |
||||
} |
||||
|
||||
public function edit($id){ |
||||
$setting = Testimonial::findorfail($id); |
||||
return view($this->view.'edit',compact('setting')); |
||||
} |
||||
|
||||
public function update(Request $request , $id){ |
||||
|
||||
$setting = Testimonial::findorfail($id); |
||||
|
||||
$this->validate(\request(),[ |
||||
// 'heading' =>'required', |
||||
// 'title' =>'required', |
||||
// 'image' =>'required|file|mimes:jpeg,png,jpg,pdf', |
||||
'review' =>'required', |
||||
'author_name' =>'required', |
||||
'author_designation' =>'required', |
||||
'status' =>'required', |
||||
]); |
||||
|
||||
if(\request('image')){ |
||||
if($request->hasFile('image')){ |
||||
$extension = \request()->file('image')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('testimonial',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type); |
||||
$image_path1 = $out_put_path[0]; |
||||
} |
||||
} |
||||
$requestData = $request->all(); |
||||
if(isset($image_path1)){ |
||||
$requestData['image'] = $image_path1; |
||||
} |
||||
$requestData['review'] = strip_tags($request['review']); |
||||
$setting->fill($requestData); |
||||
$setting->save(); |
||||
Session::flash('success','Testimonial is Updated!'); |
||||
return redirect($this->redirect); |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
public function delete($id) |
||||
{ |
||||
$setting=Testimonial::findorfail($id); |
||||
if (is_file(public_path().'/'.$setting->image) && file_exists(public_path().'/'.$setting->image)){ |
||||
unlink(public_path().'/'.$setting->image); |
||||
} |
||||
$setting->delete(); |
||||
Session::flash('success','Testimonial has been sucessfully deleted!'); |
||||
return redirect($this->redirect); |
||||
//dd("here"); |
||||
} |
||||
} |
@ -0,0 +1,308 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers; |
||||
|
||||
use App\Models\NewsAndUpdate; |
||||
use App\Models\Service; |
||||
use App\Models\AboutUs; |
||||
use App\Models\Accomodation; |
||||
use App\Models\Gallery; |
||||
use App\Models\Slider; |
||||
use App\Models\Contact; |
||||
use App\Models\Setting; |
||||
use App\Models\Applicant; |
||||
use App\Models\Subscription; |
||||
use App\Models\ApplicantService; |
||||
use App\Models\Testimonial; |
||||
use Illuminate\Http\Request; |
||||
use Illuminate\Support\Facades\Auth; |
||||
use Mail; |
||||
use App\Models\User; |
||||
use App\Models\Partner; |
||||
use PDF; |
||||
use Illuminate\Support\Facades\Storage; |
||||
|
||||
class HomeController extends Controller |
||||
{ |
||||
|
||||
public function runQueueJobs(){ |
||||
Artisan::call('queue:listen'); |
||||
} |
||||
|
||||
public function index() |
||||
{ |
||||
|
||||
$about_us = AboutUs::where('status',1)->get(); |
||||
$testimonials = Testimonial::where('status',1)->get(); |
||||
$news_and_updates= NewsAndUpdate::where(['status'=>'1'])->orderBy('id','desc')->get(); |
||||
$sliders = Slider::where('status',1)->get(); |
||||
$services = Service::where('status',1)->orderByRaw('CONVERT(order_by, SIGNED) asc')->limit(9)->get(); |
||||
$partners = Partner::where('status',1)->get(); |
||||
|
||||
$phone = Setting::where(['key' => 'phone','status' => '1'])->first(); |
||||
$email = Setting::where(['key' => 'email','status' => '1'])->first(); |
||||
$address = Setting::where(['key' => 'address','status' => '1'])->first(); |
||||
return view('welcome',compact('services','sliders','about_us','news_and_updates','testimonials','phone','email','address','partners')); |
||||
} |
||||
|
||||
public function service(){ |
||||
$services = Service::where('status',1)->orderByRaw('CONVERT(order_by, SIGNED) asc')->get(); |
||||
$service_limit = Service::where('status',1)->limit('8')->get(); |
||||
return view('service', compact('services','service_limit')); |
||||
} |
||||
|
||||
public function about(){ |
||||
$about = AboutUs::where('status',1)->get(); |
||||
return view('about',compact('about')); |
||||
} |
||||
|
||||
public function ndis(){ |
||||
return view('ndis-scheme'); |
||||
} |
||||
public function contact(){ |
||||
// $services = Service::where('status',1)->get(); |
||||
$phone = Setting::where(['key' => 'phone','status' => '1'])->first(); |
||||
$email = Setting::where(['key' => 'email','status' => '1'])->first(); |
||||
$address = Setting::where(['key' => 'address','status' => '1'])->first(); |
||||
return view('contact',compact('phone','email','address')); |
||||
} |
||||
|
||||
public function accommodation_details($id){ |
||||
$accomodation = Accomodation::find($id); |
||||
return view('accommodation',compact('accomodation')); |
||||
} |
||||
|
||||
public function send_contact_mail(Request $request){ |
||||
$contact = new Contact(); |
||||
$subject = 'Contact Enquiry'; |
||||
$check = ''; |
||||
if(isset($request['firstname'])){ |
||||
$subject = 'Quick Enquiry'; |
||||
$check = '1'; |
||||
} |
||||
$name = ($request['firstname'] != null) ? ($request['firstname'].' '.$request['lastname']) : $request['fullname'] ; |
||||
|
||||
$contact->fullname = $name; |
||||
$contact->email = $request['email']; |
||||
$contact->phone = $request['phone']; |
||||
$contact->message = $request['message']; |
||||
|
||||
|
||||
// if($request->service_id != null){ |
||||
// $service = Service::find($request['service_id'])->name ; |
||||
// $contact->service_id = $request['service_id']; |
||||
// } |
||||
$contact->save(); |
||||
|
||||
dispatch(function() use ($check,$subject, $contact) { |
||||
\Mail::send('contact_mail', array( |
||||
|
||||
'full_name' =>$contact['fullname'], |
||||
|
||||
'email' =>$contact['email'], |
||||
|
||||
'phone' =>$contact['phone'], |
||||
|
||||
'contact_message' =>$contact['message'], |
||||
|
||||
'subject' =>$subject , |
||||
|
||||
'check' => $check ?? '' |
||||
|
||||
), function($message) use ($subject){ |
||||
// $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; |
||||
$message->subject($subject); |
||||
// $message->to('info@agilityhomecare.com.au', 'AgilityHomeCare')->subject($subject); |
||||
$message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); |
||||
|
||||
|
||||
}); |
||||
}); |
||||
|
||||
return response()->json(['success' => 'Thank you for your interest. We will get back to you soon.','status' =>'Ok'],200); |
||||
|
||||
} |
||||
|
||||
public function save_career(Request $request){ |
||||
|
||||
$applicant = new Applicant(); |
||||
$subject = 'Career Enquiry'; |
||||
|
||||
// $name = ($request['firstname'] != null) ? ($request['firstname'].' '.$request['lastname']) : $request['fullname'] ; |
||||
$name = $request['name']; |
||||
$applicant->name = $name; |
||||
$applicant->email = $request['email']; |
||||
$applicant->phone = $request['phone']; |
||||
$applicant->message = $request['message']; |
||||
$applicant->state = $request['state']; |
||||
$applicant->is_in_mailing_list = $request['is_in_mailing_list']; |
||||
|
||||
if($request->hasFile('file')){ |
||||
$extension = \request()->file('file')->getClientOriginalExtension(); |
||||
$image_folder_type = array_search('applicant',config('custom.image_folders')); //for image saved in folder |
||||
$count = rand(100,999); |
||||
$out_put_path = User::save_image(\request('file'),$extension,$count,$image_folder_type); |
||||
|
||||
is_array($out_put_path) ? $applicant->resume = $out_put_path[0] : $applicant->resume = $out_put_path; |
||||
} |
||||
|
||||
if($applicant->save()){ |
||||
$services = $request['career_areas']; |
||||
if(!is_null($services)){ |
||||
foreach($services as $service){ |
||||
$applicant_service = new ApplicantService(); |
||||
$applicant_service->applicant_id = $applicant->id; |
||||
$applicant_service->service_id = $service; |
||||
$applicant_service->save(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
dispatch(function() use ($subject, $applicant ,$services) { |
||||
\Mail::send('career_mail', array( |
||||
|
||||
'name' => $applicant->first()->name, |
||||
|
||||
'email' => $applicant->first()->email, |
||||
|
||||
'phone' => $applicant->first()->phone, |
||||
|
||||
'message_details' => $applicant->first()->message, |
||||
|
||||
'state' => $applicant->first()->state, |
||||
|
||||
'subject' =>$subject , |
||||
|
||||
'services' =>$services , |
||||
|
||||
), function($message) use ($subject,$applicant){ |
||||
// $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; |
||||
$message->subject($subject); |
||||
if($applicant->resume != ''){ |
||||
$resume = url($applicant->resume); |
||||
$message->attach($resume); |
||||
} |
||||
// $message->to('info@agilityhomecare.com.au', 'AgilityHomeCare')->subject($subject); |
||||
$message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); |
||||
// $message->cc('extratechweb@gmail.com', 'Extratech')->subject($subject); |
||||
|
||||
|
||||
}); |
||||
}); |
||||
|
||||
return redirect()->back()->with(['msg' => 'Successfully submitted.']); |
||||
|
||||
} |
||||
|
||||
public function testimonials(){ |
||||
$testimonials = Testimonial::where('status',1)->get(); |
||||
return view('testimonial',compact('testimonials')); |
||||
} |
||||
|
||||
public function blogs(){ |
||||
$blogs = NewsAndUpdate::where('status',1)->get(); |
||||
return view('blogs',compact('blogs')); |
||||
} |
||||
|
||||
public function single(){ |
||||
return view('service.single'); |
||||
} |
||||
|
||||
public function career(){ |
||||
$career = Career::where(['status'=>1])->get(); |
||||
return view('career',compact('career')); |
||||
} |
||||
|
||||
public function enquiry(){ |
||||
$services = Service::where('status',1)->orderByRaw('CONVERT(order_by, SIGNED) asc')->get(); |
||||
return view('enquiry',compact('services')); |
||||
} |
||||
|
||||
public function coordination(){ |
||||
return view('coordination-form'); |
||||
} |
||||
|
||||
public function gallery(){ |
||||
$gallery = Gallery::where(['status'=>1])->get(); |
||||
return view('gallery',compact('gallery')); |
||||
} |
||||
|
||||
public function working_dice(){ |
||||
$services = Service::where('status',1)->get(); |
||||
return view('working-dice',compact('services')); |
||||
} |
||||
|
||||
public function getLogin() |
||||
{ |
||||
if(Auth::check()){ |
||||
return redirect('admin'); |
||||
} |
||||
return view('admin.login'); |
||||
} |
||||
public function postLogin() |
||||
{ |
||||
$this->validate(request(),[ |
||||
'email'=>'required', |
||||
'password'=>'required', |
||||
]); |
||||
|
||||
|
||||
|
||||
if (Auth::attempt(['email'=>request('email'),'password'=>request('password')],request()->has('remember'))){ |
||||
return redirect('admin'); |
||||
} |
||||
// Session::flash('success','Invalid Credential!'); |
||||
return redirect('login')->withErrors(['Invalid Credentials!']); |
||||
} |
||||
|
||||
public function admin() |
||||
{ |
||||
if(Auth::check()){ |
||||
return view('admin.index'); |
||||
} |
||||
} |
||||
|
||||
public function getLogout() |
||||
{ |
||||
Auth::logout(); |
||||
return redirect('login'); |
||||
} |
||||
public function subscribe(Request $request) |
||||
{ |
||||
|
||||
$email = $request->email; |
||||
$name = $request->name; |
||||
$subscription = new Subscription(); |
||||
$subscription->email = $email; |
||||
$subscription->name = $name; |
||||
$subscription->save(); |
||||
|
||||
dispatch(function() use ($subscription) { |
||||
\Mail::send('subscribe_mail', array( |
||||
|
||||
'email' =>$subscription['email'], |
||||
|
||||
'name' =>$subscription['name'], |
||||
|
||||
'subject' => 'Subscription Notice', |
||||
|
||||
), function($message) use ($subscription){ |
||||
|
||||
$subject = 'Subscription Notice'; |
||||
$message->subject('Subscription Notice'); |
||||
// $message->to('info@agilityhomecare.com.au', 'Qualuty Allied Health')->subject($subject); |
||||
$message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); |
||||
// $message->cc('info@extratechs.com.au', 'Extratech')->subject('Subscription Notice'); |
||||
|
||||
}); |
||||
}); |
||||
return response()->json(['success' => 'Successfully subscribed!','status' =>'Ok'],200); |
||||
} |
||||
|
||||
public function single_blog($slug){ |
||||
$blog = NewsAndUpdate::where(['slug' => $slug,'status' => 1])->orderby('id','asc')->first(); |
||||
// $services = Service::where('status',1)->get(); |
||||
return view('blog.single',compact('blog')); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,16 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class AboutUs extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $table = "about_us"; |
||||
|
||||
public function about_us_points(){ |
||||
return $this->hasMany(AboutUsPoint::class); |
||||
} |
||||
} |
@ -0,0 +1,16 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class AboutUsPoint extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $table = "about_us_points"; |
||||
|
||||
public function about_us(){ |
||||
return $this->belongsto(AboutUs::class); |
||||
} |
||||
} |
@ -0,0 +1,31 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Accomodation extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $fillable=['title','slider_image','status','address','phone','email','website']; |
||||
|
||||
public function accommodation_features() |
||||
{ |
||||
return $this->hasMany(AccomodationFeature::class); |
||||
} |
||||
|
||||
public function accommodation_slider_titles() |
||||
{ |
||||
return $this->hasMany(AccomodationSliderTitle::class); |
||||
} |
||||
|
||||
public function accommodation_informations() |
||||
{ |
||||
return $this->hasMany(AccomodationInformation::class); |
||||
} |
||||
public function accommodation_images() |
||||
{ |
||||
return $this->hasMany(AccomodationImage::class); |
||||
} |
||||
} |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class AccomodationFeature extends Model |
||||
{ |
||||
use HasFactory; |
||||
} |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class AccomodationImage extends Model |
||||
{ |
||||
use HasFactory; |
||||
} |
@ -0,0 +1,12 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class AccomodationInformation extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $table = 'accomodation_informations'; |
||||
} |
@ -0,0 +1,12 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class AccomodationSliderTitle extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $table = 'accomodation_slider_titles'; |
||||
} |
@ -0,0 +1,16 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Applicant extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
public function applicant_service(){ |
||||
|
||||
return $this->hasMany(ApplicantService::class); |
||||
} |
||||
} |
@ -0,0 +1,13 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class ApplicantService extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
protected $table = "applicant_service"; |
||||
} |
@ -0,0 +1,15 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Career extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
public function career_points(){ |
||||
return $this->hasMany(CareerPoint::class); |
||||
} |
||||
} |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class CareerPoint extends Model |
||||
{ |
||||
use HasFactory; |
||||
} |
@ -0,0 +1,17 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Contact extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $fillable=['fullname','email','service_id','phone','message','status','created_at']; |
||||
|
||||
public function service(){ |
||||
return $this->belongsto(Service::class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,13 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Gallery extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $fillable=['slug','point_title','blog_type','image','image_alt','description','seo_title','seo_description','middle_description','bottom_description','keyword','meta_keyword','status','publish_date','title','image_credit','author','image_caption']; |
||||
|
||||
} |
@ -0,0 +1,17 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class NewsAndUpdate extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $fillable=['slug','point_title','blog_type','image','image_alt','description','seo_title','seo_description','middle_description','bottom_description','keyword','meta_keyword','status','publish_date','title','image_credit','author','image_caption']; |
||||
|
||||
public function news_and_update_points() |
||||
{ |
||||
return $this->hasMany(NewsAndUpdatePoint::class,'news_and_update_id'); |
||||
} |
||||
} |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class NewsAndUpdatePoint extends Model |
||||
{ |
||||
use HasFactory; |
||||
} |
@ -0,0 +1,13 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Partner extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
protected $guarded = ['id']; |
||||
} |
@ -0,0 +1,16 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Referral extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
public function referral_services() |
||||
{ |
||||
return $this->hasMany(ReferralService::class,'referral_id'); |
||||
} |
||||
} |
@ -0,0 +1,13 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class ReferralService extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
|
||||
} |
@ -0,0 +1,12 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class SeoTitle extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $fillable = ['seo_title','seo_type','seo_description','keyword','meta_keyword','status']; |
||||
} |
@ -0,0 +1,15 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Service extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
public function service_sections(){ |
||||
return $this->hasMany(ServiceSection::class); |
||||
} |
||||
} |
@ -0,0 +1,18 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class ServiceSection extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
public function service(){ |
||||
return $this->belongsTo(Service::class); |
||||
} |
||||
public function service_section_point(){ |
||||
return $this->hasMany(ServiceSectionPoint::class); |
||||
} |
||||
} |
@ -0,0 +1,16 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class ServiceSectionPoint extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
public function service_section() |
||||
{ |
||||
return $this->belongsTo(ServiceSection::class); |
||||
} |
||||
} |
@ -0,0 +1,60 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Setting extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
protected $fillable =['key','value','type','slug','status']; |
||||
|
||||
public function setting_alt() |
||||
{ |
||||
return $this->hasOne(SettingImageAlt::class,'setting_id'); |
||||
} |
||||
public static function value($kay) |
||||
{ |
||||
|
||||
if ($setting = Setting::select('value')->where('slug',$kay)->where('status','1')->first()){ |
||||
return $setting->value; |
||||
} |
||||
else{ |
||||
return ''; |
||||
} |
||||
} |
||||
public static function key($kay) |
||||
{ |
||||
if ($setting = Setting::select('key')->where('slug',$kay)->where('status','1')->first()){ |
||||
return $setting->key; |
||||
} |
||||
else{ |
||||
return ''; |
||||
} |
||||
} |
||||
|
||||
public static function create_slug($string) |
||||
{ |
||||
$replace = '-'; |
||||
|
||||
$string = strtolower($string); |
||||
|
||||
// replace / and . with white space |
||||
$string = preg_replace("/[\/\.]/"," ",$string); |
||||
$string = preg_replace("/[^a-z0-9\s-]/","",$string); |
||||
|
||||
// remove multiple dashes or whitespace |
||||
$string = preg_replace("/[\s-]+/"," ",$string); |
||||
|
||||
// convert whitespaces and underscore to $replace |
||||
$string = preg_replace("/[\s_]/",$replace,$string); |
||||
|
||||
// limit the string size |
||||
$string = substr($string,0,100); |
||||
|
||||
// slug is generated |
||||
return $string; |
||||
} |
||||
} |
@ -0,0 +1,13 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class SettingImageAlt extends Model |
||||
{ |
||||
use HasFactory; |
||||
|
||||
|
||||
} |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Slider extends Model |
||||
{ |
||||
use HasFactory; |
||||
} |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Subscription extends Model |
||||
{ |
||||
use HasFactory; |
||||
} |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class SupportCoordination extends Model |
||||
{ |
||||
use HasFactory; |
||||
} |
@ -0,0 +1,12 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Team extends Model |
||||
{ |
||||
use HasFactory; |
||||
protected $fillable=['image','team_name','address','email','mobile_no','address','designation','status','created_at','update_at']; |
||||
} |
@ -0,0 +1,12 @@ |
||||
<?php |
||||
|
||||
namespace App\Models; |
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
use Illuminate\Database\Eloquent\Model; |
||||
|
||||
class Testimonial extends Model |
||||
{ |
||||
protected $fillable = ['image','heading','title','author_name','author_designation','review','status']; |
||||
use HasFactory; |
||||
} |
@ -0,0 +1,90 @@ |
||||
<?php |
||||
return [ |
||||
'status' =>[ |
||||
'1'=> 'Active', |
||||
'2'=> 'DeActive' |
||||
], |
||||
'setting_types'=>[ |
||||
'1'=>'Sentence', |
||||
'2'=>'Paragraph', |
||||
'3'=>'Image' |
||||
], |
||||
'blog_types'=>[ |
||||
|
||||
'1'=>'News', |
||||
'2'=>'Notice', |
||||
|
||||
], |
||||
'states' =>[ |
||||
'1'=> 'Queensland', |
||||
'2'=> 'South Australia', |
||||
'3' => 'Tasmania', |
||||
'4' => 'Victoria', |
||||
'5' => 'Western Australia', |
||||
'6' => 'Northern Territory', |
||||
'7' => 'Australian Capital Territory', |
||||
'8' => 'New South Wales' |
||||
|
||||
], |
||||
'career_areas' => [ |
||||
|
||||
'1' => 'Support Workers', |
||||
'2' => 'Support Coordination', |
||||
'3' => 'Plan Management', |
||||
'4' => 'Administration and Management' |
||||
], |
||||
|
||||
'faqs_types' =>[ |
||||
'1' => 'Service', |
||||
'2' => 'Academy' |
||||
], |
||||
'image_folders'=>[ |
||||
'1' =>'setting', |
||||
'2' =>'about_us', |
||||
'3'=>'service', |
||||
'4'=>'slider', |
||||
'5' => 'team', |
||||
'6' => 'news_and_update', |
||||
'7'=>'gallery', |
||||
'8'=>'ndis_plan', |
||||
'9' => 'testimonial', |
||||
'10' => 'accomodation', |
||||
'11'=>'applicant', |
||||
'12'=>'partner' |
||||
|
||||
], |
||||
'course_types'=>[ |
||||
'1' =>'Upcoming Courses', |
||||
'2' =>'Recommended Courses', |
||||
// '3'=>'Trending Courses', |
||||
], |
||||
'query_types'=>[ |
||||
'1' =>'Contact Us', |
||||
'2' =>'Quick In Query', |
||||
], |
||||
'ndis_plan'=>[ |
||||
'1' =>'Self Managed', |
||||
'2' =>'Agency Managed', |
||||
'3' => 'Plan Managed' |
||||
], |
||||
'contact_us_types'=>[ |
||||
'1' =>'Course', |
||||
'2' =>'Service', |
||||
], |
||||
'trending_courses'=>[ |
||||
'1' =>'Yes', |
||||
'2' =>'No', |
||||
], |
||||
'seo_types'=>[ |
||||
'1' =>'Project', |
||||
'2' =>'Academy', |
||||
'3'=>'Blog', |
||||
'4'=>'Contact', |
||||
'5' => 'Home', |
||||
'6'=> 'About', |
||||
'7' => 'Faq' |
||||
], |
||||
'file_dir'=>'storage_new', |
||||
'domain_suffix' =>'np', |
||||
'per_page' =>10, |
||||
]; |
@ -0,0 +1,36 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateSettingsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('settings', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('key'); |
||||
$table->string('value'); |
||||
$table->string('slug')->unique(); |
||||
$table->string('type'); |
||||
$table->enum('status',['1','2']); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('settings'); |
||||
} |
||||
} |
@ -0,0 +1,38 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateSlidersTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('sliders', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('title1'); |
||||
$table->string('title2')->nullable(); |
||||
$table->longText('description'); |
||||
$table->string('image')->nullable(); |
||||
$table->string('image_alt')->nullable(); |
||||
$table->string('link'); |
||||
$table->enum('status',['1','2']); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('sliders'); |
||||
} |
||||
} |
@ -0,0 +1,47 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateServicesTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('services', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('name'); |
||||
// $table->string('image_title'); |
||||
// $table->string('image'); |
||||
// $table->string('description_title'); |
||||
// $table->string('image_description'); |
||||
// $table->longText('top_description'); |
||||
// $table->longText('bottom_description'); |
||||
// $table->string('point_title'); |
||||
$table->string('seo_title'); |
||||
$table->longText('seo_description'); |
||||
$table->string('keywords'); |
||||
$table->longText('meta_keywords'); |
||||
$table->enum('status',[1,2]); |
||||
// $table->string('image_alt')->nullable(); |
||||
$table->string('order_by'); |
||||
$table->string('slug'); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('services'); |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateServicePointsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('service_points', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->bigInteger('service_id')->unsigned(); |
||||
$table->foreign('service_id')->references('id')->on('services')->onDelete('cascade'); |
||||
$table->string('point'); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('service_points'); |
||||
} |
||||
} |
@ -0,0 +1,50 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateNewsAndUpdatesTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('news_and_updates', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->integer('blog_type'); |
||||
$table->string('image'); |
||||
$table->string('image_alt'); |
||||
$table->longText('description'); |
||||
$table->longText('middle_description')->nullable(); |
||||
$table->longText('bottom_description')->nullable(); |
||||
$table->string('seo_title')->nullable(); |
||||
$table->longText('seo_description')->nullable(); |
||||
$table->string('keyword'); |
||||
$table->string('slug'); |
||||
$table->longText('meta_keyword')->nullable(); |
||||
$table->enum('status',['1','2']); // 1 for active , 2 for de-active |
||||
$table->date('publish_date'); |
||||
$table->string('title'); |
||||
$table->string('point_title')->nullable(); |
||||
$table->string('image_credit')->nullable(); |
||||
$table->string('author')->nullable(); |
||||
$table->string('image_caption')->nullable(); |
||||
$table->enum('type',['1','2']); //1 for blog, 2 for featured bogs |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('news_and_updates'); |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateNewsAndUpdatePointsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('news_and_update_points', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->bigInteger('news_and_update_id')->unsigned(); |
||||
$table->foreign('news_and_update_id')->references('id')->on('news_and_updates'); |
||||
$table->string('point'); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('news_and_update_points'); |
||||
} |
||||
} |
@ -0,0 +1,38 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateTestimonialsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('testimonials', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('image'); |
||||
$table->string('heading')->nullable(); |
||||
$table->string('title')->nullable(); |
||||
$table->string('author_name'); |
||||
$table->string('author_designation'); |
||||
$table->longText('review'); |
||||
$table->enum('status',['1','2']); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('testimonials'); |
||||
} |
||||
} |
@ -0,0 +1,37 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateSeoTitlesTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('seo_titles', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->integer('seo_type'); |
||||
$table->string('seo_title')->nullable(); |
||||
$table->longText('seo_description')->nullable(); |
||||
$table->string('keyword')->nullable(); |
||||
$table->longText('meta_keyword')->nullable(); |
||||
$table->enum('status',[1,2]); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('seo_titles'); |
||||
} |
||||
} |
@ -0,0 +1,40 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateServiceSectionsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('service_sections', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->bigInteger('service_id')->unsigned(); |
||||
$table->foreign('service_id')->references('id')->on('services')->onDelete('cascade'); |
||||
$table->string('image')->nullable(); |
||||
$table->string('title'); |
||||
$table->string('sub_title')->nullable(); |
||||
$table->longText('description'); |
||||
$table->longText('sub_description')->nullable(); |
||||
$table->enum('status',[1,2]); |
||||
$table->string('order_by'); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('service_sections'); |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateServiceSectionPointsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('service_section_points', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->bigInteger('service_section_id')->unsigned(); |
||||
$table->foreign('service_section_id')->references('id')->on('service_sections')->onDelete('cascade'); |
||||
$table->string('point'); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('service_section_points'); |
||||
} |
||||
} |
@ -0,0 +1,33 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class AddShortDescriptionToServicesTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::table('services', function (Blueprint $table) { |
||||
$table->longText('short_description'); |
||||
$table->string('icon')->nullable(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::table('services', function (Blueprint $table) { |
||||
// |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,35 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateAboutUsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('about_us', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('image'); |
||||
$table->string('title')->nullable(); |
||||
$table->longText('description'); |
||||
$table->longText('sub_description')->nullable(); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('about_us'); |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateAboutUsPointsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('about_us_points', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->bigInteger('about_us_id')->unsigned(); |
||||
$table->foreign('about_us_id')->references('id')->on('about_us'); |
||||
$table->string('point'); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('about_us_points'); |
||||
} |
||||
} |
@ -0,0 +1,37 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class AddSeoFieldsToAboutUsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::table('about_us', function (Blueprint $table) { |
||||
$table->string('seo_title')->nullable(); |
||||
$table->longText('seo_description')->nullable(); |
||||
$table->string('keyword'); |
||||
$table->string('slug'); |
||||
$table->longText('meta_keyword')->nullable(); |
||||
$table->enum('status',['1','2']); // 1 for active , 2 for de-active |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::table('about_us', function (Blueprint $table) { |
||||
// |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,38 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateTeamsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('teams', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('team_name'); |
||||
$table->string('email')->unique()->nullable(); |
||||
$table->string('mobile_no')->nullable(); |
||||
$table->string('address')->nullable(); |
||||
$table->string('image'); |
||||
$table->string('designation'); |
||||
$table->enum('status',[1,2]); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('teams'); |
||||
} |
||||
} |
@ -0,0 +1,39 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateContactsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('contacts', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->bigInteger('service_id')->unsigned()->nullable(); |
||||
$table->foreign('service_id')->references('id')->on('services')->nullable(); |
||||
$table->string('fullname'); |
||||
// $table->string('last_name'); |
||||
$table->string('email'); |
||||
$table->string('phone'); |
||||
$table->string('message'); |
||||
$table->boolean('status')->default(true); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('contacts'); |
||||
} |
||||
} |
@ -0,0 +1,42 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateCareersTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('careers', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('title')->nullable(); |
||||
$table->longtext('sub_title')->nullable(); |
||||
$table->longtext('point_title')->nullable(); |
||||
$table->longtext('description')->nullable(); |
||||
$table->longtext('sub_description')->nullable(); |
||||
$table->string('seo_title')->nullable(); |
||||
$table->longText('seo_description')->nullable(); |
||||
$table->string('keyword'); |
||||
$table->string('slug'); |
||||
$table->longText('meta_keyword')->nullable(); |
||||
$table->enum('status',['1','2']); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('careers'); |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateCareerPointsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('career_points', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->bigInteger('career_id')->unsigned(); |
||||
$table->foreign('career_id')->references('id')->on('careers'); |
||||
$table->longtext('point'); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('career_points'); |
||||
} |
||||
} |
@ -0,0 +1,32 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class AddImageToCareersTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::table('careers', function (Blueprint $table) { |
||||
$table->string('image')->nullable(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::table('careers', function (Blueprint $table) { |
||||
// |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,35 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
class CreateSubscriptionsTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('subscriptions', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('email'); |
||||
$table->string('name')->nullable(); |
||||
$table->timestamp('email_verified_at')->nullable(); |
||||
$table->boolean('status')->nullable()->default(true); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('subscriptions'); |
||||
} |
||||
} |
@ -0,0 +1,34 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
return new class extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('setting_image_alts', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->bigInteger('setting_id')->unsigned(); |
||||
$table->foreign('setting_id')->references('id')->on('settings')->onDelete('cascade'); |
||||
$table->string('image_alt')->nullable(); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('setting_image_alts'); |
||||
} |
||||
}; |
@ -0,0 +1,36 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Database\Migrations\Migration; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Support\Facades\Schema; |
||||
|
||||
return new class extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('partners', function (Blueprint $table) { |
||||
$table->id(); |
||||
$table->string('image'); |
||||
$table->string('title')->nullable(); |
||||
$table->string('sub_title')->nullable(); |
||||
$table->string('name')->nullable(); |
||||
$table->enum('status',['1','2']); |
||||
$table->timestamps(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('partners'); |
||||
} |
||||
}; |
@ -0,0 +1,471 @@ |
||||
.sb{ |
||||
background: #13a64f; |
||||
padding-bottom: 50px; |
||||
} |
||||
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active{ |
||||
background: #eaf3ff; |
||||
color:#103d7d; |
||||
} |
||||
.sidebar-mini .main-sidebar .nav-link i{ |
||||
margin-right: 10px; |
||||
} |
||||
.sidebar-mini .main-sidebar .nav-link:hover i{ |
||||
color:#29323d!important; |
||||
} |
||||
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active i{ |
||||
color:#103d7d; |
||||
} |
||||
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link:hover{ |
||||
background: #fcfcfc; |
||||
color:#29323d!important; |
||||
} |
||||
.main-sidebar .brand-link{ |
||||
background: #fcfcfc; |
||||
} |
||||
.extratech-logo{ |
||||
width: 230px; |
||||
background:#FFFFFF; |
||||
margin-top: 10px; |
||||
} |
||||
.main-header{ |
||||
background: #13a64f; |
||||
} |
||||
.nav-link i{ |
||||
color:#fff; |
||||
} |
||||
.note-editing-area{ |
||||
min-height: 100px !important; |
||||
} |
||||
.user-panel{ |
||||
border-bottom: 1px solid #eaf3ff!important; |
||||
} |
||||
.form-control{ |
||||
height:45px; |
||||
padding-left: 7px; |
||||
} |
||||
.card-header{ |
||||
padding-right: 30px; |
||||
} |
||||
svg{ |
||||
width:20px!important; |
||||
} |
||||
.pagination-page p{ |
||||
margin-top: 20px!important; |
||||
} |
||||
|
||||
/* Dropdown Button */ |
||||
.dropbtn { |
||||
border: none; |
||||
background: none; |
||||
color:#c2c7d0; |
||||
} |
||||
|
||||
/* The container <div> - needed to position the dropdown content */ |
||||
.dropdown { |
||||
position: relative; |
||||
display: inline-block; |
||||
padding: 0 3rem; |
||||
width:100%; |
||||
color:#c2c7d0; |
||||
} |
||||
.dropdown:hover{ |
||||
background: #fcfcfc; |
||||
border-radius: 0.25rem; |
||||
} |
||||
.dropdown button,i{ |
||||
color:#FFFFFF; |
||||
} |
||||
.dropdown:hover button{ |
||||
color:#29323d!important; |
||||
} |
||||
.dropdown i{ |
||||
color:#c2c7d0; |
||||
margin-right: 5px; |
||||
} |
||||
.dropdown:hover i{ |
||||
color:#29323d!important; |
||||
} |
||||
|
||||
/* Dropdown Content (Hidden by Default) */ |
||||
/* .dropdown-content { |
||||
display: none; |
||||
position: absolute; |
||||
background-color: #f1f1f1; |
||||
min-width: 10px!important; |
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); |
||||
z-index: 1; |
||||
border-radius:0.25rem; |
||||
top:35px; |
||||
left:35px; |
||||
width:85%; |
||||
} */ |
||||
|
||||
/* Links inside the dropdown */ |
||||
.dropdown-content a { |
||||
color: black!important; |
||||
padding: 12px 16px; |
||||
text-decoration: none; |
||||
display: block; |
||||
} |
||||
.nav-pills .nav-link.active{ |
||||
background: #eaf3ff; |
||||
color:#103d7d; |
||||
width:100%; |
||||
} |
||||
.nav-pills .nav-link:hover{ |
||||
background: #eaf3ff; |
||||
color:#103d7d; |
||||
width:100%; |
||||
} |
||||
.dropdown-content a:hover { |
||||
background: #eaf3ff!important; |
||||
color:#103d7d!important; |
||||
} |
||||
|
||||
/* Show the dropdown menu on hover */ |
||||
.dropdown:hover .dropdown-content { |
||||
display: block; |
||||
} |
||||
|
||||
/* Change the background color of the dropdown button when the dropdown content is shown */ |
||||
.dropdown:hover .dropbtn { |
||||
background: #fcfcfc; |
||||
} |
||||
|
||||
.back-button{ |
||||
color:white; |
||||
float:right; |
||||
background:#007bff; |
||||
padding:5px 10px; |
||||
border-radius:5px; |
||||
} |
||||
|
||||
.nav-item{ |
||||
width:100%; |
||||
} |
||||
|
||||
/* accordion */ |
||||
|
||||
.acc-card{ |
||||
box-shadow: none; |
||||
background: none!important; |
||||
color:white; |
||||
margin-bottom: 0px; |
||||
} |
||||
.acc-card .card-header{ |
||||
padding: 0.5rem 1rem; |
||||
border-bottom: none ; |
||||
} |
||||
.acc-card .card-header button{ |
||||
padding:unset!important; |
||||
color:#c2c7d0; |
||||
} |
||||
.acc-card .card-header button:hover{ |
||||
color:#fff; |
||||
} |
||||
.acc-card .card-header button i{ |
||||
margin-right: 12px; |
||||
color:#fff; |
||||
} |
||||
.acc-card .card-body{ |
||||
padding: 0.5rem 2.5rem; |
||||
} |
||||
.acc-card .card-body a{ |
||||
padding:unset; |
||||
} |
||||
.acc-card .nav-link{ |
||||
color: #fff !important; |
||||
padding: 0.5rem 0 0.5rem 0.5rem!important; |
||||
margin: 0.1rem 0; |
||||
width: unset !important; |
||||
} |
||||
.acc-card .nav-link.active{ |
||||
color: #103d7d !important; |
||||
} |
||||
|
||||
.table-search{ |
||||
width: fit-content; |
||||
} |
||||
.table-search input{ |
||||
margin-right: 10px; |
||||
border-radius: 5px!important; |
||||
} |
||||
|
||||
|
||||
.add-points{ |
||||
border:1px solid #00000032; |
||||
padding:10px; |
||||
} |
||||
.add-points input{ |
||||
margin-bottom:10px; |
||||
width:80%; |
||||
border:1px solid #00000032; |
||||
border-radius:2px; |
||||
padding:5px; |
||||
} |
||||
.create-button{ |
||||
margin-top:10px; |
||||
} |
||||
.create-button .col-md-12{ |
||||
/* display:flex; |
||||
justify-content:center; */ |
||||
} |
||||
.create-button .col-md-12 button{ |
||||
padding:10px 50px; |
||||
} |
||||
.dom-box{ |
||||
position: relative; |
||||
} |
||||
.close-button{ |
||||
background:none; |
||||
border:none; |
||||
position:absolute; |
||||
top:0; |
||||
right:0px; |
||||
color:red; |
||||
} |
||||
|
||||
/*.add-points .close-point{*/ |
||||
/* background:none;*/ |
||||
/* border:none;*/ |
||||
/* position:absolute;*/ |
||||
/* right:100px;*/ |
||||
/* top:65px;*/ |
||||
/* color:red;*/ |
||||
/* font-size:10px;*/ |
||||
/*}*/ |
||||
.add-point-btn{ |
||||
width:20%; |
||||
} |
||||
.point1{ |
||||
position:relative; |
||||
} |
||||
.point1 button{ |
||||
position:absolute; |
||||
/* right:90px; */ |
||||
top:10px; |
||||
background:none; |
||||
border:none; |
||||
color:red; |
||||
font-size: 10px; |
||||
} |
||||
.point_old{ |
||||
position:relative; |
||||
|
||||
} |
||||
.close-point i{ |
||||
color:red; |
||||
font-size:12px; |
||||
} |
||||
.close-point{ |
||||
position:absolute; |
||||
border:none; |
||||
top:6px; |
||||
right:0px; |
||||
background: none; |
||||
|
||||
} |
||||
|
||||
|
||||
.table-search{ |
||||
/* width: fit-content; */ |
||||
} |
||||
.search-form .table-search input{ |
||||
/* margin-right: 10px; */ |
||||
border-radius: 5px!important; |
||||
} |
||||
.ds-input:focus{ |
||||
border-color: #1850b7; |
||||
} |
||||
|
||||
/* new edit */ |
||||
|
||||
.table td{ |
||||
padding:0.5rem; |
||||
} |
||||
.table>:not(:last-child)>:last-child>{ |
||||
border-bottom-color: red!important; |
||||
} |
||||
.action-icons i{ |
||||
color:#62666a; |
||||
} |
||||
.action-icons a{ |
||||
padding:5px; |
||||
} |
||||
.action-icons i:hover{ |
||||
color:#212529; |
||||
} |
||||
|
||||
.input-group{ |
||||
border-radius:5px; |
||||
padding:0; |
||||
} |
||||
.input-group input, select{ |
||||
padding: 0 10px!important; |
||||
} |
||||
.input-group .form-control{ |
||||
font-size: 12px; |
||||
} |
||||
.input-group .form-control:focus{ |
||||
box-shadow: none; |
||||
} |
||||
.main-sidebar .brand-link{ |
||||
height: 90px; |
||||
} |
||||
.ml-auto i{ |
||||
color:#fff; |
||||
} |
||||
.dropdown-menubar .dropdown-toggle{ |
||||
padding:0; |
||||
background: none; |
||||
border:none; |
||||
color:#fff; |
||||
} |
||||
.dropdown-menubar .dropdown-menu[data-bs-popper]{ |
||||
|
||||
} |
||||
.dropdown-menubar button:active{ |
||||
background-color: none; |
||||
} |
||||
.btn:focus { |
||||
box-shadow: none; |
||||
} |
||||
.dropdown:hover{ |
||||
background: none; |
||||
} |
||||
.dropdown:hover .dropdown-toggle{ |
||||
color: #fff !important;; |
||||
} |
||||
.dropdown-menubar .dropdown-toggle:active{ |
||||
background: none!important; |
||||
} |
||||
.dropdown-menubar .dropdown-menu{ |
||||
padding:0; |
||||
} |
||||
.nav-sidebar .nav-item p{ |
||||
color:#fff; |
||||
} |
||||
.nav-sidebar .nav-item:hover p{ |
||||
color:#212529; |
||||
} |
||||
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active i,.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active p{ |
||||
color:#212529; |
||||
} |
||||
.os-content{ |
||||
padding: 0 !important; |
||||
} |
||||
.nav-item{ |
||||
padding:0 10px; |
||||
} |
||||
.nav-item:hover{ |
||||
padding:0; |
||||
} |
||||
.btn-green{ |
||||
color:#fff; |
||||
background: #13a64f; |
||||
border-color:#13a64f; |
||||
} |
||||
.btn-green:hover{ |
||||
color:#fff; |
||||
background: #ea8937; |
||||
border-color:#ea8937; |
||||
} |
||||
.card-header{ |
||||
padding: 1rem 1rem!important; |
||||
} |
||||
.card-header .card-title{ |
||||
font-weight: bold; |
||||
font-size: 24px; |
||||
} |
||||
.card-header>.card-tools{ |
||||
margin-right:unset; |
||||
} |
||||
|
||||
/* login page */ |
||||
|
||||
.login-icon{ |
||||
border:none; |
||||
} |
||||
.login-icon .input-group-text{ |
||||
background: #ea8937; |
||||
color: #fff; |
||||
} |
||||
.login-icon .input-group-text{ |
||||
background: #ea8937; |
||||
color: #fff; |
||||
} |
||||
label:not(.form-check-label):not(.custom-file-label){ |
||||
font-weight: 500; |
||||
} |
||||
.breadcrumb-item a{ |
||||
text-decoration: none; |
||||
} |
||||
.card-header a{ |
||||
text-decoration: none; |
||||
} |
||||
.admin-profile{ |
||||
background: #FFFFFF; |
||||
border-radius: 50%; |
||||
padding: 8px; |
||||
height: 60px; |
||||
width: 60px; |
||||
} |
||||
.admin-profile img{ |
||||
max-width: 100%; |
||||
max-height: 100%; |
||||
} |
||||
.main-footer{ |
||||
font-weight: bold; |
||||
font-size: 16px; |
||||
text-align: right; |
||||
color: #0a0e14; |
||||
} |
||||
.main-footer a{ |
||||
color: #D8622A; |
||||
font-weight: bold; |
||||
font-size: 16px; |
||||
text-decoration: none; |
||||
} |
||||
.main-footer a:hover{ |
||||
color: #4b84d3; |
||||
font-weight: bold; |
||||
font-size: 16px; |
||||
text-decoration: none; |
||||
} |
||||
.small-box .icon>i { |
||||
font-size: 61px; |
||||
position: absolute; |
||||
right: 15px; |
||||
top: 25px; |
||||
color: #FFFFFF; |
||||
} |
||||
.pagination-default nav div:first-child a, .pagination-default nav div:first-child span { |
||||
display: none; |
||||
} |
||||
.pagination-default p{ |
||||
display: flex; |
||||
gap: 5px; |
||||
} |
||||
p .font-medium{ |
||||
display: block !important; |
||||
} |
||||
.contact-info li span:first-child { |
||||
font-weight: 700; |
||||
font-size: 16px; |
||||
color: #000; |
||||
width: 400px; |
||||
} |
||||
.contact-info{ |
||||
display: inline-block; |
||||
padding: 0; |
||||
margin: 0; |
||||
width: 100%; |
||||
} |
||||
.contact-info li{ |
||||
margin: 10px 0; |
||||
} |
||||
|
||||
/* admin table css */ |
||||
.admin-table img{ |
||||
width: 200px !important; |
||||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue