diff --git a/app/Http/Controllers/Admin/AboutUsController.php b/app/Http/Controllers/Admin/AboutUsController.php index 61875ac..6170022 100644 --- a/app/Http/Controllers/Admin/AboutUsController.php +++ b/app/Http/Controllers/Admin/AboutUsController.php @@ -59,14 +59,16 @@ class AboutUsController extends Controller 'description' => 'required', 'sub_description' => 'required', - 'image' => 'required|file|mimes:jpeg,png,jpg', - 'keyword' => 'required' + 'bottom_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->description = (\request('description')); + $setting->sub_description = (\request('sub_description')); + $setting->bottom_description = \request('bottom_description'); $setting->status = \request('status'); $setting->title = \request('title'); $setting->bottom_title = \request('bottom_title'); @@ -148,16 +150,18 @@ class AboutUsController extends Controller $setting=AboutUs::findorfail($id); $this->validate(\request(),[ - 'keyword' => 'required', + // 'keyword' => 'required', 'description' => 'required', - 'image' => 'file|mimes:jpeg,png,jpg', + 'sub_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->description = (\request('description')); + $setting->sub_description = (\request('sub_description')); + $setting->bottom_description = \request('bottom_description'); $setting->status = \request('status'); $setting->title = \request('title'); $setting->bottom_title = \request('bottom_title'); diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php new file mode 100644 index 0000000..ba055a3 --- /dev/null +++ b/app/Http/Controllers/ContactController.php @@ -0,0 +1,59 @@ +fullname = $request['full_name']; + $contact->email = $request['email']; + $contact->phone = $request['phone']; + $contact->message = $request['message']; + $contact->nationality = $request['nationality']; + + $contact->save(); + + // dispatch(function() use ($check,$subject, $contact) { + \Mail::send('contact_mail', array( + + 'full_name' =>$request['full_name'], + + 'email' =>$request['email'], + + 'phone' =>$request['phone'], + + 'nationality' =>$request['nationality'], + + 'contact_message' =>$request['message'], + + 'subject' =>$subject + + + ), 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); + // $message->cc('suman@extratechs.com.u', 'Extratech')->subject($subject); + + + }); + // }); + // return redirect()->back()->with(['msg' => 'Successfully submitted.']); + return redirect()->back()->with(['msg' => 'Thank you for your interest. We will get back to you soon.','status' =>'Ok'],200); + + } +} diff --git a/app/Http/Controllers/StudyAbroadController.php b/app/Http/Controllers/StudyAbroadController.php index 4202210..29c8ec9 100644 --- a/app/Http/Controllers/StudyAbroadController.php +++ b/app/Http/Controllers/StudyAbroadController.php @@ -8,7 +8,12 @@ use App\Models\Service; class StudyAbroadController extends Controller { public function study_abroad(){ - $services = Service::where('status',1)->get(); + $services = Service::with('service_sections')->get(); return view('study-abroad',compact('services')); } + + public function details($slug){ + $service = Service::where(['slug' => $slug,'status' => 1])->orderby('order_by','asc')->first(); + return view('study-abroad-detail',compact('service')); + } } diff --git a/app/Http/Controllers/VisaController.php b/app/Http/Controllers/VisaController.php new file mode 100644 index 0000000..a48ea8d --- /dev/null +++ b/app/Http/Controllers/VisaController.php @@ -0,0 +1,14 @@ +get(); + return view('visa',compact('visas')); + } +} diff --git a/database/migrations/2022_07_06_091450_create_services_table.php b/database/migrations/2022_07_06_091450_create_services_table.php index 3b73ca5..c0b7862 100644 --- a/database/migrations/2022_07_06_091450_create_services_table.php +++ b/database/migrations/2022_07_06_091450_create_services_table.php @@ -24,7 +24,7 @@ class CreateServicesTable extends Migration // $table->longText('bottom_description'); // $table->string('point_title'); $table->string('seo_title'); - $table->longText('seo_description'); + $table->longText('seo_description')->nullable(); $table->string('keywords'); $table->longText('meta_keywords'); $table->enum('status',[1,2]); diff --git a/database/migrations/2022_12_12_093112_create_visa_services_table.php b/database/migrations/2022_12_12_093112_create_visa_services_table.php index bbbdd8f..1549c52 100644 --- a/database/migrations/2022_12_12_093112_create_visa_services_table.php +++ b/database/migrations/2022_12_12_093112_create_visa_services_table.php @@ -17,7 +17,7 @@ return new class extends Migration $table->id(); $table->string('name'); $table->string('seo_title'); - $table->longText('seo_description'); + $table->longText('seo_description')->nullable(); $table->string('keywords'); $table->longText('meta_keywords'); $table->enum('status',[1,2]); diff --git a/database/migrations/2023_01_27_102353_add_nationality_to_contacts_table.php b/database/migrations/2023_01_27_102353_add_nationality_to_contacts_table.php new file mode 100644 index 0000000..0d3d0b2 --- /dev/null +++ b/database/migrations/2023_01_27_102353_add_nationality_to_contacts_table.php @@ -0,0 +1,32 @@ +string('nationality')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('contacts', function (Blueprint $table) { + // + }); + } +}; diff --git a/database/migrations/2023_01_27_112013_add_bottom_description_to_about_us_table.php b/database/migrations/2023_01_27_112013_add_bottom_description_to_about_us_table.php new file mode 100644 index 0000000..4244a5e --- /dev/null +++ b/database/migrations/2023_01_27_112013_add_bottom_description_to_about_us_table.php @@ -0,0 +1,32 @@ +string('bottom_description')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('about_us', function (Blueprint $table) { + // + }); + } +}; diff --git a/public/images/service/2023/01/27/3e7580411c5d71dde9a771aecf741758.png b/public/images/service/2023/01/27/3e7580411c5d71dde9a771aecf741758.png new file mode 100644 index 0000000..ddb0505 Binary files /dev/null and b/public/images/service/2023/01/27/3e7580411c5d71dde9a771aecf741758.png differ diff --git a/public/images/service/2023/01/27/440b9071f3cbc706db1eddc0586c4beb.svg b/public/images/service/2023/01/27/440b9071f3cbc706db1eddc0586c4beb.svg new file mode 100644 index 0000000..70c9bd9 --- /dev/null +++ b/public/images/service/2023/01/27/440b9071f3cbc706db1eddc0586c4beb.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/public/images/service/2023/01/27/a25ff2c3a4ffef92445a9507c97bc71a.png b/public/images/service/2023/01/27/a25ff2c3a4ffef92445a9507c97bc71a.png new file mode 100644 index 0000000..6217c77 Binary files /dev/null and b/public/images/service/2023/01/27/a25ff2c3a4ffef92445a9507c97bc71a.png differ diff --git a/public/images/visa_service/2023/01/23/63638b52aa4d9cad02ccef19d4601e8d.png b/public/images/visa_service/2023/01/23/63638b52aa4d9cad02ccef19d4601e8d.png deleted file mode 100644 index b65bcea..0000000 Binary files a/public/images/visa_service/2023/01/23/63638b52aa4d9cad02ccef19d4601e8d.png and /dev/null differ diff --git a/public/images/visa_service/2023/01/23/75e38195942c186526fecdcb46bce904.jpeg b/public/images/visa_service/2023/01/23/75e38195942c186526fecdcb46bce904.jpeg deleted file mode 100644 index c34f1fd..0000000 Binary files a/public/images/visa_service/2023/01/23/75e38195942c186526fecdcb46bce904.jpeg and /dev/null differ diff --git a/public/images/visa_service/2023/01/27/0002a36d761ff22efba271d76111ef8a.svg b/public/images/visa_service/2023/01/27/0002a36d761ff22efba271d76111ef8a.svg new file mode 100644 index 0000000..70c9bd9 --- /dev/null +++ b/public/images/visa_service/2023/01/27/0002a36d761ff22efba271d76111ef8a.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/public/images/visa_service/2023/01/27/57b106a7c6f774313201376345dcba0d.svg b/public/images/visa_service/2023/01/27/57b106a7c6f774313201376345dcba0d.svg new file mode 100644 index 0000000..70c9bd9 --- /dev/null +++ b/public/images/visa_service/2023/01/27/57b106a7c6f774313201376345dcba0d.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/public/images/visa_service/2023/01/27/883104c5142e46c0cb872806936a0228.svg b/public/images/visa_service/2023/01/27/883104c5142e46c0cb872806936a0228.svg new file mode 100644 index 0000000..70c9bd9 --- /dev/null +++ b/public/images/visa_service/2023/01/27/883104c5142e46c0cb872806936a0228.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/public/images/visa_service/2023/01/27/bc804c9c9e533c4b8a25f341ab7fcf2b.svg b/public/images/visa_service/2023/01/27/bc804c9c9e533c4b8a25f341ab7fcf2b.svg new file mode 100644 index 0000000..70c9bd9 --- /dev/null +++ b/public/images/visa_service/2023/01/27/bc804c9c9e533c4b8a25f341ab7fcf2b.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/resources/views/admin/about_us/create.blade.php b/resources/views/admin/about_us/create.blade.php index e1b807e..01bc10b 100644 --- a/resources/views/admin/about_us/create.blade.php +++ b/resources/views/admin/about_us/create.blade.php @@ -32,20 +32,26 @@
- +
- + +
+
+
+
+ +
-
@@ -66,47 +72,21 @@
- -{{-- --}} +
- +
-
-
- - -
-
+ -
-
-
-
-
-
-
-
- - - - -
- -
- -
-
-
-
+
@@ -135,25 +115,45 @@ @endsection @section('script') diff --git a/resources/views/admin/about_us/edit.blade.php b/resources/views/admin/about_us/edit.blade.php index f5b7483..d529f96 100644 --- a/resources/views/admin/about_us/edit.blade.php +++ b/resources/views/admin/about_us/edit.blade.php @@ -44,14 +44,21 @@
- +
+
+
+
+ +
-
@@ -73,46 +80,17 @@
- +
- -
-
-
-
- - +
-
-
-
-
-
- - - -
- @foreach($about_us->about_us_points as $point) -
-
-
- -
- @endforeach - -
- -
-
-
-
@@ -146,47 +124,45 @@ } }); - $(document).ready(function() { - $('.summernote_class').summernote() - }) - - var point_count = 1; - function getPoint(count){ - point_count = point_count +1; - var html = '
'+ - '
'+ - ''+ - '
'; - $('#point_g_1').append(html); - } - function deletePoint(count){ - if($('.point').length > 1){ - $('#point'+count).remove(); + ClassicEditor + .create( document.querySelector( '#body' ), + { + ckfinder: { + uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}', } - } + + }) + ClassicEditor + .create( document.querySelector( '#body1' ), + { + ckfinder: { + uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}', + } + }) + ClassicEditor + .create( document.querySelector( '#body2' ), + { + ckfinder: { + uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}', } + }) + ClassicEditor + .create( document.querySelector( '#body3' ), + { + ckfinder: { + uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}', } + }) + ClassicEditor + .create( document.querySelector( '#body4' ), + { + ckfinder: { + uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}', } + }) + .catch( error => + { console.error( error ); + } + ); - function deletePointPermanently(id){ - if($('.point').length > 1){ - if (confirm("Are you sure Delete?")) { - $.ajax({ - /* the route pointing to the post function */ - type: 'GET', - url: Laravel.url +"/admin/blog_point/"+id, - dataType: 'json', - processData: false, // tell jQuery not to process the data - contentType: false, - /* remind that 'data' is the response of the AjaxController */ - success: function (data) { - $('#point_old'+data.blog_point_id).remove(); - }, - error: function(error) { - - } - }); - } - return false; - } - } + @endsection diff --git a/resources/views/admin/layouts/app.blade.php b/resources/views/admin/layouts/app.blade.php index 527a0a4..040d4c8 100644 --- a/resources/views/admin/layouts/app.blade.php +++ b/resources/views/admin/layouts/app.blade.php @@ -33,9 +33,9 @@ {!! Html::style('admin/plugins/daterangepicker/daterangepicker.css') !!} {{-- --}} - {!! Html::style('admin/plugins/summernote/summernote-bs4.min.css') !!} + {!! Html::style('admin/flatpickr/dist/flatpickr.min.css') !!} - + + + + + \ No newline at end of file diff --git a/resources/views/contact_mail.blade.php b/resources/views/contact_mail.blade.php new file mode 100644 index 0000000..5046635 --- /dev/null +++ b/resources/views/contact_mail.blade.php @@ -0,0 +1,27 @@ + + + +

Contact Details

+
+
+
+

Please, find out the contact details

+ Full Name: {{ $full_name }}

+ Email: {{ $email }}

+ Phone: {{$phone}}

+ + Nationality: {{$nationality}}

+ + Message: {{ $contact_message }}

+ +
+
+ diff --git a/resources/views/layout/app.blade.php b/resources/views/layout/app.blade.php index 6a70a56..3bdb1f1 100644 --- a/resources/views/layout/app.blade.php +++ b/resources/views/layout/app.blade.php @@ -77,7 +77,7 @@ STUDY ABROAD
-

Student Visa

+
-
- .... + @foreach($visas as $visa) +
+ {!!$visa->short_description!!}
-
-

Subclass 500

+ @endforeach + + + +
diff --git a/routes/web.php b/routes/web.php index f3cd4e3..ec9aa51 100644 --- a/routes/web.php +++ b/routes/web.php @@ -13,6 +13,8 @@ use App\Http\Controllers\Admin\ContactUsController; use App\Http\Controllers\Admin\EnrollmentController; use App\Http\Controllers\Admin\GalleryController; use App\Http\Controllers\HomeController; +use App\Http\Controllers\VisaController; +use App\Http\Controllers\ContactController; use App\Http\Controllers\StudyAbroadController; use App\Http\Controllers\Admin\HomeController as HomeAdminController; use App\Http\Controllers\Admin\SliderController; @@ -51,9 +53,19 @@ Route::get('login', [HomeAdminController::class,'getLogin'])->name('login'); Route::post('login', [HomeAdminController::class,'postLogin']); Route::get('study-abroad', [StudyAbroadController::class,'study_abroad']); -Route::get('/study-abroad-detail', function () { - return view('study-abroad-detail'); +Route::get('/education/{slug}', [StudyAbroadController::class,'details']); +// Route::get('/study-abroad-detail', function () { +// return view('study-abroad-detail'); +// }); +Route::get('visas', [VisaController::class,'index']); +Route::get('/contact', function () { + return view('contact'); +}); +Route::post('contact', [ContactController::class,'post_contact']); +Route::get('/about', function () { + return view('about'); }); +Route::post('image-upload', [ImageUploadController::class, 'storeImage'])->name('image.upload'); //upload image in CkEditor Route::group(['middleware'=>['auth']],function (){ //routes for admin @@ -268,12 +280,4 @@ Route::group(['middleware'=>['auth']],function (){ // Route::get('/study-abroad-detail', function () { // return view('study-abroad-detail'); // }); -Route::get('/visa', function () { - return view('visa'); -}); -Route::get('/contact', function () { - return view('contact'); -}); -Route::get('/about', function () { - return view('about'); -}); +