Need Help Controller

Posted 3 years ago by Rafazion

Campaigns Controller:

public function show($id) { $campaign = $this->campaign->getModel()->findOrFail($id);

    return view('campaigns.show', compact('campaign'));
}

/**
 * Show the form for editing the specified resource.
 *
 * @param  int  $id
 * @param  FormBuilder  $formBuilder
 * @return Response
 */
public function edit($id, FormBuilder $formBuilder)
{
    //puxando os status
    $campaign_status_result = DB::table('campaign_status')->select('id', 'label')->get();

    //puxando os types
    $campaign_types_result = DB::table('campaign_types')->select('id', 'label')->get();

    //puxando os users
    $users_result = DB::table('users')->select('id')->get();

    //puxando os managers
    $managers_result = DB::table('users')->select('id')->get();

I need to make a parameter where I can see the id to the label in the show method

Please sign in or create an account to participate in this conversation.