app/Http/Controllers/PageController.php
/**
     * Display contacts page
     *
     * @return \Illuminate\Http\Response
     */
Display contacts page
@return \Illuminate\Http\Response
Display contacts page @return \ Illuminate \ Http \ Response
public function contacts()
    {
        $slug = 'contacts';
        $page = Page::where('slug', '=', $slug)->firstOrFail();
        $contact = Contact::latest()->first();
        $coordinates = $contact->getCoordinates()[0];
        return view('contacts', compact('page', 'contact', 'coordinates'));
    }
public function contacts ( ) { $ slug = 'contacts' ; $ page = Page :: where ( 'slug' , '=' , $ slug ) -> firstOrFail ( ) ; $ contact = Contact :: latest ( ) -> first ( ) ; $ coordinates = $ contact -> getCoordinates ( ) [ 0 ] ; return view ( 'contacts' , compact ( 'page' , 'contact' , 'coordinates' ) ) ; }
Display contacts page
 @return \Illuminate\Http\Response
Display contacts page @return \ Illuminate \ Http \ Response