Components\ContactManager\Controllers\Backend\ContactController::index PHP Метод

index() публичный Метод

Display a listing of the resource.
public index ( )
    public function index()
    {
        foreach ($this->forms as $i => $form) {
            $model_name = "Components\\ContactManager\\Models\\{$this->forms[$i]['model']}";
            if ($i == 0) {
                $this->forms[$i]['entries'] = $model_name::with('category')->get();
                // Donot show all fields in the index page
                $this->forms[$i]['fields'] = array_diff($this->forms[$i]['fields'], array('image', 'email', 'telephone', 'fax', 'email', 'location', 'city', 'state', 'zip_code'));
                $this->forms[$i]['field_names'] = array_diff($this->forms[$i]['fields'], array('Image', 'Email', 'Telephone', 'Fax', 'Email', 'Location', 'City', 'State', 'Zip_code'));
            } else {
                $this->forms[$i]['entries'] = $model_name::get();
            }
        }
        $this->layout->title = "All Entries in {$this->module_name}";
        $this->layout->content = View::make("contact_manager::index")->with('title', "All Entries in {$this->module_name}")->with('forms', $this->forms);
    }