@extends('layouts.app_main') @section('content')
Contact Details
@if (session('success'))
{{ session('success') }}
@endif
{{Auth::user()->email}}
{{count(Auth::user()->contact_details)?(Auth::user()->contact_details->last()->number):''}}
{!!count(Auth::user()->contact_details)?nl2br(Auth::user()->contact_details->last()->address):''!!}
@endsection @section('javascript') function gup(name) { url = location.href; name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( url ); return results == null ? null : results[1]; } $(function () { if(gup('edit')){ $('.show_text').hide(); $('.show_form').show(); }else{ $('.show_text').show(); $('.show_form').hide(); } }); $('.edit_button').on('click',function(){ window.location.href = location.href + "?edit=1"; }); @endsection