App\Http\Controllers\VendorController::edit PHP Method

edit() public method

Show the form for editing the specified resource.
public edit ( App\Http\Requests\VendorRequest $request ) : Response
$request App\Http\Requests\VendorRequest
return Response
    public function edit(VendorRequest $request)
    {
        $vendor = $request->entity();
        $data = ['vendor' => $vendor, 'method' => 'PUT', 'url' => 'vendors/' . $vendor->public_id, 'title' => trans('texts.edit_vendor')];
        $data = array_merge($data, self::getViewModel());
        if (Auth::user()->account->isNinjaAccount()) {
            if ($account = Account::whereId($client->public_id)->first()) {
                $data['planDetails'] = $account->getPlanDetails(false, false);
            }
        }
        return View::make('vendors.edit', $data);
    }