FormController::index PHP Method

index() public method

public index ( $id = null )
    public function index($id = null)
    {
        if ($id) {
            $form_entries = FormEntry::where('form_id', $id)->get();
        } else {
            $form_entries = FormEntry::all();
        }
        $this->layout->title = 'Form Entries';
        $this->layout->content = View::make('forms::index')->with('form_id', $id)->with('form_entries', $form_entries);
    }