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

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

Show the form for editing the specified resource.
public edit ( integer $id, $form_id )
$id integer
$form_id
    public function edit($id, $form_id)
    {
        // Get only the form that matches the specified form id
        $form = $this->getForm($form_id);
        $model_name = "Components\\ContactManager\\Models\\{$form['model']}";
        $entry = $model_name::findOrFail($id);
        $categories = ContactCategory::lists('name', 'id');
        $entry->location = json_decode($entry->location, true);
        $this->layout->title = "Edit contact in {$this->module_name}";
        $this->layout->content = View::make("contact_manager::create_edit")->with('title', "Edit contact in module {$this->module_name}")->with('entry', $entry)->with('form', $form)->with('categories', $categories);
    }