aplus#24
Mahesh Sharma 2 years ago
parent c2cae4470c
commit d75688595a
  1. 32
      app/Http/Controllers/Admin/NewsAndUpdateController.php
  2. 2
      app/Http/Controllers/Admin/VisaServiceController.php
  3. 1
      app/Http/Controllers/HomeController.php
  4. 2
      app/Models/NewsAndUpdate.php
  5. 4
      config/custom.php
  6. 2
      database/migrations/2022_12_14_071738_add_image_to_visa_services_table.php
  7. 32
      database/migrations/2022_12_14_093317_add_thumbnai_to_news_and_updates_table.php
  8. BIN
      public/frontend/.DS_Store
  9. BIN
      public/images/news_and_update/2022/12/14/305b95b50e3530e978e779f5ca431a5b.jpeg
  10. BIN
      public/images/news_and_update/2022/12/14/3e151b4e1e3a3d5eb4db8d72666a65d6.jpeg
  11. BIN
      public/images/news_and_update/2022/12/14/4e0ce4da583b4939acaddfe7f9a3779a.jpeg
  12. 0
      public/images/news_and_update/2022/12/14/765d36be8f87786e1e09049684d040f3.jpeg
  13. BIN
      public/images/news_and_update/2022/12/14/7fe9a55ac4800260b39524359cd1ecdd.jpeg
  14. BIN
      public/images/news_and_update/2022/12/14/8cbf7018583a039c2e50f83858b791a5.jpeg
  15. BIN
      public/images/news_and_update/2022/12/14/afb58cdba5b645f0826ee8a9e43ac702.jpeg
  16. BIN
      public/images/news_and_update/2022/12/14/ce5572c130720f6ae2332dec9a2ab6ae.jpeg
  17. BIN
      public/images/news_and_update/2022/12/14/ce706dfb910f0a8dab7ef0246792e3c1.jpeg
  18. BIN
      public/images/news_and_update/2022/12/14/ecbec01b556e0614572ccb4459493715.jpeg
  19. BIN
      public/images/news_and_update/2022/12/14/fc0d4e2779a8ebfc6559a637aedddc67.jpeg
  20. 10
      public/images/service/2022/12/13/d86498cb6e2a179f74828163114034b9.svg
  21. BIN
      public/images/service/2022/12/14/fa40f0aeeee884422ab00d05625d7291.jpeg
  22. BIN
      public/images/visa_service/2022/12/14/95a9e667eba5b9da5a7ad116f99afdea.jpeg
  23. 6
      resources/views/admin/news_and_update/create.blade.php
  24. 12
      resources/views/admin/news_and_update/edit.blade.php
  25. 6
      resources/views/admin/news_and_update/index.blade.php
  26. 8
      resources/views/admin/visa_service/edit.blade.php
  27. 52
      resources/views/layout/app.blade.php
  28. 20
      resources/views/news.blade.php
  29. 4
      resources/views/services.blade.php
  30. 24
      resources/views/welcome.blade.php

@ -53,7 +53,8 @@ class NewsAndUpdateController extends Controller
'keyword' => 'required',
'meta-keyword' => 'nullable',
'status' => 'required',
'image' => 'required|file|mimes:jpeg,png,jpg,pdf'
'image' => 'required|file|mimes:jpeg,png,jpg,pdf',
'thumbnail' => 'required',
]);
if($request->hasFile('image')){
$extension = \request()->file('image')->getClientOriginalExtension();
@ -62,14 +63,23 @@ class NewsAndUpdateController extends Controller
$out_put_path = User::save_image(\request('image'),$extension,$count,$image_folder_type);
$image_path1 = $out_put_path[0];
}
if($request->hasFile('thumbnail')){
$extension = \request()->file('thumbnail')->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('thumbnail'),$extension,$count,$image_folder_type);
$thumbnail_path1 = $out_put_path[0];
}
$requestData = $request->all();
if(isset($image_path1)){
$requestData['image'] = $image_path1;
}
if(isset($thumbnail_path1)){
$requestData['thumbnail'] = $thumbnail_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){
@ -96,7 +106,6 @@ class NewsAndUpdateController extends Controller
public function update(Request $request, $id){
// dd(\request()->all());
$setting =NewsAndUpdate::findorfail($id);
$this->validate(\request(), [
'description' => 'required',
@ -110,7 +119,7 @@ class NewsAndUpdateController extends Controller
if(\request('image')){
$this->validate(\request(),[
'image' => 'file|mimes:jpeg,png,jpg,pdf'
'image' => 'file|mimes:jpeg,png,jpg'
]);
if($request->hasFile('image')){
$extension = \request()->file('image')->getClientOriginalExtension();
@ -122,6 +131,17 @@ class NewsAndUpdateController extends Controller
unlink(public_path().'/'.$setting->image);
}
}
}
if($request->hasFile('thumbnail')){
$extension = \request()->file('thumbnail')->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('thumbnail'),$extension,$count,$image_folder_type);
$thumbnail_path1 = $out_put_path[0];
if (is_file(public_path().'/'.$setting->thumbnail) && file_exists(public_path().'/'.$setting->thumbnail)){
unlink(public_path().'/'.$setting->thumbnail);
}
}
@ -130,7 +150,9 @@ class NewsAndUpdateController extends Controller
if(isset($image_path1)){
$requestData['image'] = $image_path1;
}
$requestData['blog_type'] =1;
if(isset($thumbnail_path1)){
$requestData['thumbnail'] = $thumbnail_path1;
}
$setting->fill($requestData);
$setting->save();
if(\request('point_title') ){

@ -203,7 +203,7 @@ class VisaServiceController extends Controller
$extension = \request()->file('image')->getClientOriginalExtension();
$image_folder_type = array_search('vis_service',config('custom.image_folders')); //for image saved in folder
$image_folder_type = array_search('visa_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);

@ -21,6 +21,7 @@ use App\Models\User;
use App\Models\Partner;
use PDF;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Artisan;
class HomeController extends Controller
{

@ -8,7 +8,7 @@ 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'];
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','thumbnail'];
public function news_and_update_points()
{

@ -11,8 +11,8 @@ return [
],
'blog_types'=>[
'1'=>'News',
'2'=>'Notice',
'1'=>'Featured',
'2'=>'Not Featured',
],
'states' =>[

@ -14,7 +14,7 @@ return new class extends Migration
public function up()
{
Schema::table('visa_services', function (Blueprint $table) {
//
$table->string('image')->nullable();
});
}

@ -0,0 +1,32 @@
<?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::table('news_and_updates', function (Blueprint $table) {
$table->string('thumbnail');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('news_and_updates', function (Blueprint $table) {
//
});
}
};

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

@ -1,10 +0,0 @@
<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="90" height="90" rx="4" fill="#262535"/>
<path d="M17.5 65.4248C17.6953 60.5412 18.3204 45.7194 19.2581 41.5C20.4301 36.2258 29.8065 35.6398 32.7366 39.742C35.6667 43.8441 34.8283 46.606 36.8387 47.9463C38.5968 49.1183 41.5269 49.1183 43.2849 49.1183C46.0757 49.1183 47.9362 50.5802 48.2334 52.0484C49.514 52.2438 52.3097 52.6344 53.2473 52.6344C54.4194 52.6344 55.0054 54.3925 53.2473 54.3925C50.9032 54.3925 48.3638 54.2004 47.3871 54.1044C46.5253 54.752 45.006 55.1433 42.6989 54.9785C39.7688 54.9785 35.7844 54.8224 32.7366 53.8065C30.9785 53.2205 28.6344 49.1183 28.0484 47.9463C27.4624 46.7742 25.7043 50.2904 28.0484 52.6344C30.3925 54.9785 32.7366 60.7366 32.7366 63.6667C32.7366 66.5968 22.5789 65.8154 17.5 65.4248Z" fill="#E54E2E"/>
<path d="M60.2796 42.0861C58.5215 43.2581 55.5914 45.0162 55.0054 47.3603L63.7957 50.8764C61.2563 54.1972 63.0376 60.7366 60.1075 64.8387C64.7957 66.0108 69.6792 65.2294 73 65.4248C72.6093 62.2993 70.5935 50.9936 69.6559 46.7742C68.4839 41.5001 62.0376 40.914 60.2796 42.0861Z" fill="#F0EFFD"/>
<path d="M50.9029 58.1505C49.7309 58.1505 46.2147 57.5645 42.6988 58.7366C41.1361 60.4946 39.1823 64.0107 48.5589 64.0107C59.1071 64.0107 58.523 62.8424 57.9379 61.6721L57.9352 61.6666C56.7633 59.3226 52.075 58.1505 50.9029 58.1505Z" fill="#F0EFFD"/>
<path d="M54.4196 49.1183C53.8338 50.2903 52.0755 53.2204 51.4895 54.3924C50.5941 56.1505 53.2475 56.7365 53.8336 56.1505C54.4196 55.5645 55.5916 52.0484 56.1776 50.8763C56.7634 49.1183 55.0053 47.9462 54.4196 49.1183Z" fill="#F0EFFD"/>
<path d="M57.935 50.8764C57.3493 52.0484 56.7631 54.3925 56.177 55.5645C55.2817 57.3226 58.7041 58.3804 59.2901 57.7943C59.8762 57.2083 61.0482 53.6922 61.6342 52.5201C62.22 50.7621 58.5208 49.7043 57.935 50.8764Z" fill="#F0EFFD"/>
<circle cx="30.9785" cy="26.0215" r="7.03226" fill="#E54E2E"/>
<circle cx="56.7634" cy="31.8817" r="7.03226" fill="#F0EFFD"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@ -47,6 +47,12 @@
<input type="file" class="form-control" name="image" required>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Thumbnail <span style="color: red";> * </span> </label>
<input type="file" class="form-control" name="thumbnail" required>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label> Image Caption </label>

@ -54,6 +54,18 @@
</span>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Thumnail</label>
<input type="file" class="form-control" name="thumbnail" >
<br>
<span>
<a href="{{url($setting->thumbnail)}}" target="_blank">
<img src="{{url($setting->thumbnail)}}" alt="" style="width: 100px">
</a>
</span>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label> Image Caption </label>

@ -58,6 +58,7 @@
<th class="text-center">Title</th>
<th class="text-center">Author</th>
<th class="text-center">Publish Date</th>
<th class="text-center">Thumbnail</th>
<th class="text-center">Image</th>
<th class="text-center">Slug</th>
<th class="text-center">Status</th>
@ -72,7 +73,12 @@
<th scope="row" class="text-center">{{strip_tags($setting->title)}}</th>
<td class="text-center">{{$setting->author}}</td>
<td class="text-center">{{$setting->publish_date}}</td>
<td class="text-center">
<a href="{{url($setting->thumbnail)}}" target="_blank">
<img src="{{url($setting->thumbnail)}}" alt="" style="width: 100px;">
</a>
</td>
<td class="text-center">
<a href="{{url($setting->image)}}" target="_blank">
<img src="{{url($setting->image)}}" alt="" style="width: 100px;">

@ -19,14 +19,14 @@
<!-- SELECT2 EXAMPLE -->
<div class="card card-default">
<div class="card-header">
<h3 class="card-title">Edit Service</h3>
<a href="{{url('admin/services')}}" class="back-button btn-green">List</a>
<a href="{{url('admin/services/create')}}" class="back-button btn-green mx-2">Create</a>
<h3 class="card-title">Edit Visa Service</h3>
<a href="{{url('admin/visa_services')}}" class="back-button btn-green">List</a>
<a href="{{url('admin/visa_services/create')}}" class="back-button btn-green mx-2">Create</a>
</div>
<div class="card-body">
@include('success.success')
@include('errors.error')
{!! Form::open(['url' => '/admin/services/'.$service->id, 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!}
{!! Form::open(['url' => '/admin/visa_services/'.$service->id, 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!}
<div class="row">
<div class="col-md-4">
<div class="form-group">

@ -32,6 +32,7 @@
<body>
@php
$services = \App\Models\Service::where('status','1')->orderByRaw('CONVERT(order_by, SIGNED) asc')->get();
$visa_services = \App\Models\VisaService::where('status','1')->orderByRaw('CONVERT(order_by, SIGNED) asc')->get();
$facebook = App\Models\Setting::where(['slug' => 'facebook-link','status' => true])->first();
$instagram = App\Models\Setting::where(['slug' => 'instagram-link','status' => true])->first();
$linkedIn = App\Models\Setting::where(['slug' => 'linkedin-link','status' => true])->first();
@ -53,11 +54,10 @@
<ul>
<h5>Regional Work Visas</h5>
<li>
<a href="" class="dropdown-item">Temporary Work Visa</a>
<a href="" class="dropdown-item">Permanent Work Visas</a>
<a href="" class="dropdown-item">Temporary Independent</a>
<a href="" class="dropdown-item">Permanent Independent Visa</a>
<a href="" class="dropdown-item">Work and Holiday Visa</a>
@foreach($visa_services as $visa_service)
<a href="{{url('/visa_service/'.$visa_service->slug)}}" class="dropdown-item">{{$visa_service->name}}</a>
@endforeach
</li>
</ul>
<ul>
@ -162,10 +162,10 @@
<div class="quick-links">
<h2>Quick Links</h2>
<ul>
<li><a href="/about">About us</a></li>
<li><a href="/pathway_programme">Pathway Programme</a></li>
<li><a href="{{url('/about')}}">About us</a></li>
<li><a href="{{url('/pathway_programme')}}">Pathway Programme</a></li>
<li><a href="{{url('/news')}}">News</a></li>
<li><a href="/contact">Contact us</a></li>
<li><a href="{{url('/contact')}}">Contact us</a></li>
</ul>
</div>
</div>
@ -210,17 +210,47 @@
<script type="text/javascript" src="{{url('frontend/js/index.js')}}"></script>
<script>
var navHeader = document.getElementById('dice-nav-head');
window.onscroll= function(){
window.onscroll= function(){
if(window.scrollY > 50){
navHeader.classList.add("header-scroll");
}
if(window.scrollY==0 && location.pathname != '/news/est-dolorem-deseruntf'){
if(window.scrollY==0 && location.pathname != '/news/our-training-programme-based-on-occupational-training-allows-students-to-improve-their-skills-for-th'){
navHeader.classList.remove("header-scroll");
}
if(window.scrollY==0 && location.pathname != '/news/186-trt-pathway-permanent-residency-applications-for-457-and-482-in-the-short-term-stream'){
navHeader.classList.remove("header-scroll");
}
if(window.scrollY==0 && location.pathname != '/news/rpl-is-a-solution'){
navHeader.classList.remove("header-scroll");
}
if(window.scrollY==0 && location.pathname != '/news/skilled-nominated-visa-subclass-190'){
navHeader.classList.remove("header-scroll");
}
if(window.scrollY==0 && location.pathname != '/news/skilled-work-regional-visa-subclass-491'){
navHeader.classList.remove("header-scroll");
}
if(window.scrollY==0 && location.pathname != 'more-than-11000-new-chefs-are-expected-to-fill-australias-notorious-chef-shortage-by-2026-key-points'){
navHeader.classList.remove("header-scroll");
}
}
if(location.pathname === '/news/est-dolorem-deseruntf'){
if(location.pathname === '/news/our-training-programme-based-on-occupational-training-allows-students-to-improve-their-skills-for-th'){
navHeader.classList.add("header-scroll");
}
if(location.pathname === '/news/186-trt-pathway-permanent-residency-applications-for-457-and-482-in-the-short-term-stream'){
navHeader.classList.add("header-scroll");
}
if(location.pathname === '/news/rpl-is-a-solution'){
navHeader.classList.add("header-scroll");
}
if(location.pathname === '/news/skilled-nominated-visa-subclass-190'){
navHeader.classList.add("header-scroll");
}
if(location.pathname === '/news/skilled-work-regional-visa-subclass-491'){
navHeader.classList.add("header-scroll");
}
if(location.pathname === '/news/more-than-11000-new-chefs-are-expected-to-fill-australias-notorious-chef-shortage-by-2026-key-points'){
navHeader.classList.add("header-scroll");
}
</script>

@ -13,33 +13,35 @@
<h5>What’s New <hr></h5>
<h3>News & Updates</h3>
</div>
@php
$news_and_update = $news_and_updates->where('blog_type',1)->first();
@endphp
<div class="row mt-4">
<div class="col-md-6">
<div class="featured-news-image">
<img src="{{url($news_and_updates->first()->image ?? '')}}" class="img-fluid" alt="">
<img src="{{url($news_and_update->thumbnail ?? '')}}" class="img-fluid" alt="">
</div>
</div>
<div class="col-md-6">
<div class="featured-news-desc">
<h3>{{$news_and_updates->first()->title}}</h3>
<h5>{{$news_and_updates->first()->created_at}}</h5>
<p>{!!strip_tags(\Illuminate\Support\Str::limit($news_and_updates->first()->description, 150, $end='...'))!!}</p>
<a href="{{url('news/'.$news_and_updates->first()->slug)}}">Read More</a>
<h3>{{$news_and_update->title}}</h3>
<h5>{{$news_and_update->created_at}}</h5>
<p>{!!strip_tags(\Illuminate\Support\Str::limit($news_and_update->description, 150, $end='...'))!!}</p>
<a href="{{url('news/'.$news_and_update->slug)}}">Read More</a>
</div>
</div>
</div>
<div class="row g-4">
@foreach($news_and_updates->skip(1) as $news)
@foreach($news_and_updates->where('blog_type','!=',1)->skip(1) as $news)
<div class="col-md-4">
<div class="news-page-card">
<a href="{{url('news/'.$news->slug)}}">
<div class="news-card-img">
<img src="{{url($news->image ?? '')}}" class="img-fluid" alt="">
<img src="{{url($news->thumbnail ?? '')}}" class="img-fluid" alt="">
</div>
<div class="news-card-desc">
<h4>{{$news->title}}</h4>
<p>{{\Illuminate\Support\Str::limit($news->description, 150, $end='...')}}</p>
<p>{!!strip_tags(\Illuminate\Support\Str::limit($news->description, 150, $end='...'))!!}</p>
</div>
</a>
</div>

@ -27,7 +27,7 @@
<a href="{{url('service/'.$service->slug)}}">
@endif
<div class="our-service-img">
<img src="{{url('frontend/images/skill-assessment.png')}}" class="img-fluid" alt="">
<img src="{{url($service->image ?? '')}}" class="img-fluid" alt="">
</div>
<div class="our-service-desc">
<h3>{{$service->name}}</h3>
@ -81,7 +81,7 @@
<div class="our-service-card">
<a href="{{url('visa_service/'.$visa_service->slug)}}">
<div class="our-service-img">
<img src="{{url('frontend/images/skill-assessment.png')}}" class="img-fluid" alt="">
<img src="{{url($visa_service->image ?? '')}}" class="img-fluid" alt="">
</div>
<div class="our-service-desc">
<h3>{{$visa_service->name}}</h3>

@ -163,17 +163,19 @@
</div>
<div class="row">
<div class="col-md-6">
@php
$news_and_update = $news_and_updates->where('blog_type',1)->first();
@endphp
<div class="featured-news">
<a href="{{url('news/'.$news_and_updates->first()->slug )}}">
<a href="{{url('news/'.$news_and_update->slug )}}">
<div class="featured-news-image">
<img src="{{url($news_and_updates->first()->image ?? '')}}" class="w-100" alt="">
<img src="{{url($news_and_update->thumbnail ?? '')}}" class="w-100" alt="">
</div>
<div class="featured-content">
<p>{{$news_and_updates->first()->created_at ?? ''}}</p>
<h2>{{$news_and_updates->first()->title ?? ''}}</h2>
<p>{{$news_and_update->created_at ?? ''}}</p>
<h2>{{\Illuminate\Support\Str::limit($news_and_update->title, 20, $end='...')}}</h2>
<div class="featured-btn">
<p href="{{url('news/'.$news_and_updates->first()->slug )}}">Read more</p>
<p href="{{url('news/'.$news_and_update->slug )}}">Read more</p>
<i class="fa-solid fa-arrow-right-long"></i>
</div>
</div>
@ -182,14 +184,14 @@
</div>
<div class="col-md-6">
<div class="more-news">
@foreach($news_and_updates->skip(1) as $news)
@foreach($news_and_updates->where('blog_type','!=',1)->skip(1) as $news)
<a href="{{url('news/'.$news->slug )}}" class="more-news-box">
<div class="news-box-img">
<img src="{{url($news->image)}}" class="w-100" alt="">
<img src="{{url($news->thumbnail)}}" class="w-100" alt="">
</div>
<div class="news-box-desc">
<h4>{{$news->title}}</h4>
<p>{{\Illuminate\Support\Str::limit($news->description, 150, $end='...')}}</p>
<h4>{{\Illuminate\Support\Str::limit($news->title, 20, $end='...')}}</h4>
<p>{!!strip_tags(\Illuminate\Support\Str::limit($news->description, 60, $end='...'))!!}</p>
</div>
</a>
@endforeach
@ -248,7 +250,7 @@
@endif
@if(!is_null($email))
<a href="mailto: {{$email->value}}" class="contact-phone">
<img src="{{url('frontend/icons/contact-mail-icon.svg')}}" alt="">
<img src="{{url('frontend/icons/email-icon.svg')}}" alt="">
<h5>{{$email->value}}</h5>
</a>
@endif

Loading…
Cancel
Save