<?php

class ContactController extends AdminController
{
    public function all(){
        return View::make('admin.contact.all');
    }

    public function show($id){
        try {
            $contact = LContact::get($id);

            if(isset($contact->id)){
                Redirect::route('contacts');
            }

            return View::make('admin.contact.show')
                ->with('contact', $contact);

        } catch(Exception $e) {
            return Redirect::route('contacts');
        }
    }
}