@extends('frontend.layouts.master') @section('title') {{ __('header.contact_title') }} @endsection @section('main-content') @include('frontend.layouts.notification')
@php $settings=DB::table('settings')->get(); @endphp

{{ __('header.contact_page_title') }}

{{ __('about.home_content') }}

{{ __('header.contact_address') }}: @foreach($settings as $data) {{$data->address}} @endforeach
{{ __('header.contact_phone') }}: @foreach($settings as $data) {{$data->phone}} @endforeach / +257 22404803
{{ __('header.contact_email') }}: @foreach($settings as $data) {{$data->email}} @endforeach
Fax: +257 22404785
Whatsapp: +257 79957123
@php $settings=DB::table('settings')->get(); @endphp
@csrf
@error('name') {{ $message }} @enderror
@error('email') {{ $message }} @enderror
@error('phone') {{ $message }} @enderror
@error('subject') {{ $message }} @enderror
@error('message') {{ $message }} @enderror
@endsection @push('scripts') $(document).ready(function(){ (function($) { "use strict"; jQuery.validator.addMethod('answercheck', function (value, element) { return this.optional(element) || /^\bcat\b$/.test(value) }, "type the correct answer -_-"); // validate contactForm form $(function() { $('#contactForm').validate({ rules: { name: { required: true, minlength: 2 }, subject: { required: true, minlength: 4 }, phone: { required: true, minlength: 9 }, email: { required: true, email: true }, message: { required: true, minlength: 20 } }, messages: { name: { required: "come on, you have a name, don't you?", minlength: "your name must have at least 2 characters" }, subject: { required: "come on, you have a subject, don't you?", minlength: "your subject must have at least 4 characters" }, number: { required: "come on, you have a number, don't you?", minlength: "your Number must have at least 9 characters" }, email: { required: "no email, no message" }, message: { required: "um...yea, you have to write something to send this form.", minlength: "Your subject must have at least 10 characters" } }, submitHandler: function(form) { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $(form).ajaxSubmit({ type:"POST", data: $(form).serialize(), url: $(form).attr('action'), success: function() { $('#contactForm :input').attr('disabled', 'disabled'); $('#contactForm').fadeTo( "slow", 1, function() { $(this).find(':input').attr('disabled', 'disabled'); $(this).find('label').css('cursor','default'); $('#success').fadeIn() $('.modal').modal('hide'); $('#success').modal('show'); }) }, error: function() { $('#contactForm').fadeTo( "slow", 1, function() { $('#error').fadeIn() $('.modal').modal('hide'); $('#error').modal('show'); }) } }) } }) }) })(jQuery) }) @endpush