et#33
Mahesh Sharma 2 years ago
parent 4a305d6a92
commit ed3918d02a
  1. 7
      app/Http/Controllers/AboutUsController.php
  2. 21
      app/Http/Controllers/VisaController.php
  3. 3
      app/Models/AboutUs.php
  4. 3
      app/Models/AboutUsPoint.php
  5. 6
      app/Models/Contact.php
  6. 4
      config/database.php
  7. 57
      database/migrations/2023_02_16_164503_create_enquiries_table.php
  8. 106
      resources/views/admin/about_us/create.blade.php
  9. 2
      resources/views/welcome.blade.php

@ -7,8 +7,9 @@ use App\Models\AboutUs;
class AboutUsController extends Controller
{
public function index(){
$about = AboutUs::where('status',true)->first();
return view('about',compact('about'));
public function index()
{
$about = AboutUs::where('status', true)->first();
return view('about', compact('about'));
}
}

@ -8,15 +8,18 @@ use App\Models\Page;
class VisaController extends Controller
{
public function index(){
$page = Page::where(['title' => 'Visa','status' => 1])->first();
$visas = VisaService::where('status',1)->get();
return view('visa',compact('visas','page'));
public function index()
{
$page = Page::where(['title' => 'Visa', 'status' => 1])->first();
$visas = VisaService::where('status', 1)->get();
return view('visa', compact('visas', 'pages'));
}
public function details($slug){
$page = Page::where(['title' => 'Visa','status' => 1])->first();
$visas = VisaService::where('status',1)->get();
$service = VisaService::where(['slug' => $slug,'status' => 1])->orderby('order_by','asc')->first();
return view('visa',compact('service','page','visas'));
public function details($slug)
{
$page = Page::where(['title' => 'Visa', 'status' => 1])->first();
$visas = VisaService::where('status', 1)->get();
$service = VisaService::where(['slug' => $slug, 'status' => 1])->orderby('order_by', 'asc')->first();
return view('visa', compact('service', 'page', 'visas'));
}
}

@ -10,7 +10,8 @@ class AboutUs extends Model
use HasFactory;
protected $table = "about_us";
public function about_us_points(){
public function about_us_points()
{
return $this->hasMany(AboutUsPoint::class);
}
}

@ -10,7 +10,8 @@ class AboutUsPoint extends Model
use HasFactory;
protected $table = "about_us_points";
public function about_us(){
public function about_us()
{
return $this->belongsto(AboutUs::class);
}
}

@ -8,10 +8,10 @@ use Illuminate\Database\Eloquent\Model;
class Contact extends Model
{
use HasFactory;
protected $fillable=['fullname','email','service_id','phone','message','status','created_at'];
protected $fillable = ['fullname', 'email', 'service_id', 'phone', 'message', 'status', 'created_at'];
public function service(){
public function service()
{
return $this->belongsto(Service::class);
}
}

@ -48,8 +48,8 @@ return [
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'database' => env('DB_DATABASE', 'eteducation'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',

@ -0,0 +1,57 @@
<?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('enquiries', function (Blueprint $table) {
$table->id();
$table->string('first_name');
$table->string('middle_name');
$table->string('last_name');
$table->date('dob');
$table->string('country');
$table->string('gender');
$table->string('email');
$table->string('phone');
$table->string('address');
$table->string('highest_qualification');
$table->string('stream');
$table->string('gpa');
$table->string('graduate_year');
$table->string('gap');
$table->string('work_experience');
$table->string('salary_mode');
$table->string('test_score');
$table->string('marital_status');
$table->string('marital_date');
$table->string('spouse_academics');
$table->string('marital_date');
$table->boolean('status')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('enquiries');
}
};

@ -13,45 +13,44 @@
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
<div class="card card-default">
<div class="card-header">
<h3 class="card-title">Create AboutUs</h3>
<a href="{{url('admin/about_us')}}" class="back-button btn-green">List</a>
<a href="{{ url('admin/about_us') }}" class="back-button btn-green">List</a>
</div>
<div class="card-body">
@include('success.success')
@include('errors.error')
{!! Form::open(['url' => '/admin/about_us', 'class' => 'form-horizontal', 'method'=> 'POST','files' => true]) !!}
{!! Form::open(['url' => '/admin/about_us', 'class' => 'form-horizontal', 'method' => 'POST', 'files' => true]) !!}
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Image <span style="color: red";> * </span> </label>
<input type="file" class="form-control" name="image">
<input type="file" class="form-control" name="image">
</div>
</div>
<div class="col-md-12" >
<div class="form-group" >
<div class="col-md-12">
<div class="form-group">
<label>Top Description <span style="color: red";> * </span></label>
<textarea name="description" id="body" rows="5" style="height: 658px;">{{old('description')}}</textarea>
<textarea name="description" id="body" rows="5" style="height: 658px;">{{ old('description') }}</textarea>
</div>
</div>
<div class="col-md-12" >
<div class="form-group" >
<div class="col-md-12">
<div class="form-group">
<label>Middle Description <span style="color: red";> * </span></label>
<textarea name="sub_description" id="body1" rows="5">{{old('sub_description')}}</textarea>
<textarea name="sub_description" id="body1" rows="5">{{ old('sub_description') }}</textarea>
</div>
</div>
<div class="col-md-12" >
<div class="form-group" >
<div class="col-md-12">
<div class="form-group">
<label>Bottom Description <span style="color: red";> * </span> </label>
<textarea name="bottom_description" id="body2" rows="5" >{{old('bottom_description')}}
<textarea name="bottom_description" id="body2" rows="5">{{ old('bottom_description') }}
</textarea>
</div>
</div>
@ -59,26 +58,28 @@
<div class="col-md-6">
<div class="form-group">
<label>Seo Title</label>
<input type="text" class="form-control" id="inputPassword3" name="seo_title" value="{{old('seo_title')}}">
<input type="text" class="form-control" id="inputPassword3" name="seo_title"
value="{{ old('seo_title') }}">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label> Keyword <span style="color: red";> * </span> </label>
<input type="text" class="form-control" id="inputPassword3" name="keyword" value="{{old('keyword')}}" required>
<input type="text" class="form-control" id="inputPassword3" name="keyword"
value="{{ old('keyword') }}" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Seo Description </label>
<textarea id="body3" name="seo_description">{{old('seo_description')}}</textarea>
<textarea id="body3" name="seo_description">{{ old('seo_description') }}</textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Meta Keyword</label>
<textarea id="body4" name="meta_keyword">{{old('meta_keyword')}}</textarea>
<textarea id="body4" name="meta_keyword">{{ old('meta_keyword') }}</textarea>
</div>
</div>
<div class="col-md-6">
@ -86,8 +87,10 @@
<label>Status <span style="color: red";> * </span> </label>
<select name="status" class="form-control" id="type" required>
<option value="" selected disabled>Please select Status</option>
@foreach(config('custom.status') as $in => $val)
<option value="{{$in}}" {{(old('status')==$in) ? 'selected':''}}>{{$val}}</option>
@foreach (config('custom.status') as $in => $val)
<option value="{{ $in }}"
{{ old('status') == $in ? 'selected' : '' }}>
{{ $val }}</option>
@endforeach
</select>
@ -110,47 +113,38 @@
@section('script')
<script>
ClassicEditor
.create( document.querySelector( '#body' ),
{
ckfinder: {
uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}',
}
.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()}}',
}
})
.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()}}', }
})
.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()}}', }
})
.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 );
}
);
.create(document.querySelector('#body4'), {
ckfinder: {
uploadUrl: '{{ route('image.upload') . '?_token=' . csrf_token() }}',
}
})
.catch(error => {
console.error(error);
});
</script>
@endsection

@ -272,7 +272,7 @@
<p>Get the updates about moving to Australia with the right guidance and information from our experts.</p>
</div>
<div class="row">
@foreach($blogs as $blog)
@foreach($blogs->take(3) as $blog)
<div class="col-md-4 col-sm-12">
<a href="{{url('blog/'.$blog->slug)}}" class="text-decoration-none">
<div class="blog-card">

Loading…
Cancel
Save