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

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

@ -8,12 +8,15 @@ use App\Models\Page;
class VisaController extends Controller
{
public function index(){
public function index()
{
$page = Page::where(['title' => 'Visa', 'status' => 1])->first();
$visas = VisaService::where('status', 1)->get();
return view('visa',compact('visas','page'));
return view('visa', compact('visas', 'pages'));
}
public function details($slug){
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();

@ -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);
}
}

@ -10,8 +10,8 @@ class Contact extends Model
use HasFactory;
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,7 +13,6 @@
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- SELECT2 EXAMPLE -->
@ -59,14 +58,16 @@
<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">
@ -87,7 +88,9 @@
<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>
<option value="{{ $in }}"
{{ old('status') == $in ? 'selected' : '' }}>
{{ $val }}</option>
@endforeach
</select>
@ -110,47 +113,38 @@
@section('script')
<script>
ClassicEditor
.create( document.querySelector( '#body' ),
{
.create(document.querySelector('#body'), {
ckfinder: {
uploadUrl: '{{ route('image.upload') . '?_token=' . csrf_token() }}',
}
})
ClassicEditor
.create( document.querySelector( '#body1' ),
{
.create(document.querySelector('#body1'), {
ckfinder: {
uploadUrl: '{{ route('image.upload') . '?_token=' . csrf_token() }}',
}
})
ClassicEditor
.create( document.querySelector( '#body2' ),
{
.create(document.querySelector('#body2'), {
ckfinder: {
uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}', }
uploadUrl: '{{ route('image.upload') . '?_token=' . csrf_token() }}',
}
})
ClassicEditor
.create( document.querySelector( '#body3' ),
{
.create(document.querySelector('#body3'), {
ckfinder: {
uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}', }
uploadUrl: '{{ route('image.upload') . '?_token=' . csrf_token() }}',
}
})
ClassicEditor
.create( document.querySelector( '#body4' ),
{
.create(document.querySelector('#body4'), {
ckfinder: {
uploadUrl: '{{route('image.upload').'?_token='.csrf_token()}}', }
})
.catch( error =>
{ console.error( error );
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