<?php

class AdministratorController extends AdminController {

    public function all()
    {
        return View::make('admin.administrator.all');
    }

    public function add()
    {
        return View::make('admin.administrator.add');
    }

    public function edit($id)
    {
        try {
            $administrator = LAdministrator::get($id);
            if ($administrator) {
                return View::make('admin.administrator.edit')
                    ->with('administrator', $administrator);
            }

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

}