From ed3918d02a17899ed6914b53e8da5ef1a37152a3 Mon Sep 17 00:00:00 2001 From: Mahesh Sharma Date: Thu, 16 Feb 2023 11:39:44 +0545 Subject: [PATCH] formating --- app/Http/Controllers/AboutUsController.php | 7 +- app/Http/Controllers/VisaController.php | 21 ++-- app/Models/AboutUs.php | 3 +- app/Models/AboutUsPoint.php | 3 +- app/Models/Contact.php | 6 +- config/database.php | 4 +- ...23_02_16_164503_create_enquiries_table.php | 57 +++++++++ .../views/admin/about_us/create.blade.php | 110 +++++++++--------- resources/views/enquiry-form.blade.php | 2 +- resources/views/welcome.blade.php | 10 +- 10 files changed, 140 insertions(+), 83 deletions(-) create mode 100644 database/migrations/2023_02_16_164503_create_enquiries_table.php diff --git a/app/Http/Controllers/AboutUsController.php b/app/Http/Controllers/AboutUsController.php index 3a8f547..b4fd8d2 100644 --- a/app/Http/Controllers/AboutUsController.php +++ b/app/Http/Controllers/AboutUsController.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')); } } diff --git a/app/Http/Controllers/VisaController.php b/app/Http/Controllers/VisaController.php index dc7b4e1..fd2b27d 100644 --- a/app/Http/Controllers/VisaController.php +++ b/app/Http/Controllers/VisaController.php @@ -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')); } } diff --git a/app/Models/AboutUs.php b/app/Models/AboutUs.php index 60de2a8..58be7ea 100644 --- a/app/Models/AboutUs.php +++ b/app/Models/AboutUs.php @@ -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); } } diff --git a/app/Models/AboutUsPoint.php b/app/Models/AboutUsPoint.php index 33c15b5..236c2b6 100644 --- a/app/Models/AboutUsPoint.php +++ b/app/Models/AboutUsPoint.php @@ -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); } } diff --git a/app/Models/Contact.php b/app/Models/Contact.php index 694881b..546ca88 100644 --- a/app/Models/Contact.php +++ b/app/Models/Contact.php @@ -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); } - } diff --git a/config/database.php b/config/database.php index 137ad18..92f505b 100644 --- a/config/database.php +++ b/config/database.php @@ -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', diff --git a/database/migrations/2023_02_16_164503_create_enquiries_table.php b/database/migrations/2023_02_16_164503_create_enquiries_table.php new file mode 100644 index 0000000..934e21f --- /dev/null +++ b/database/migrations/2023_02_16_164503_create_enquiries_table.php @@ -0,0 +1,57 @@ +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'); + } +}; diff --git a/resources/views/admin/about_us/create.blade.php b/resources/views/admin/about_us/create.blade.php index 32bee85..fcf39d5 100644 --- a/resources/views/admin/about_us/create.blade.php +++ b/resources/views/admin/about_us/create.blade.php @@ -13,45 +13,44 @@ -

Create AboutUs

- List + List
@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]) !!}
- +
-
-
+
+
- +
-
-
+
+
- +
-
-
+
+
-
@@ -59,26 +58,28 @@
- +
- +
- +
- +
@@ -86,8 +87,10 @@ @@ -109,48 +112,39 @@ @endsection @section('script') - - @endsection - diff --git a/resources/views/enquiry-form.blade.php b/resources/views/enquiry-form.blade.php index d72b24e..e86ec20 100644 --- a/resources/views/enquiry-form.blade.php +++ b/resources/views/enquiry-form.blade.php @@ -216,4 +216,4 @@
-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 9874fd2..329b619 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -207,7 +207,7 @@
-
+
@foreach($testimonials as $testimonial)
@@ -261,7 +261,7 @@
--> -
+
@@ -272,7 +272,7 @@

Get the updates about moving to Australia with the right guidance and information from our experts.

- @foreach($blogs as $blog) + @foreach($blogs->take(3) as $blog)
@endforeach - +
@endsection @@ -337,4 +337,4 @@ }); }); -@endsection \ No newline at end of file +@endsection