/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $breadcrumb = array(array('label' => 'Dashboard', 'url' => '/', 'class' => 'entypo-home'), array('label' => 'Manage Campaigns', 'url' => '/campaigns', 'class' => ''), array('label' => 'Edit', 'url' => '/campaigns/edit/' . $id, 'class' => ''));
     $users = Users::select()->where('account_type', 'client')->pluck('username', 'id')->toArray();
     $gsmNumber = GsmNumber::all()->pluck('gsm_number', 'gsm_number')->toArray();
     $campaigns = Campaigns::findOrFail($id);
     //print_r($campaigns);
     return view('admin.campaigns.edit')->with('users', $users)->with('gsmNumber', $gsmNumber)->with('campaign', $campaigns)->with('breadcrumb', $breadcrumb);
 }
Beispiel #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $gsm = GsmNumber::findOrFail($id);
     $gsm->delete();
     //Session::flash('flash_message', 'Gsm number successfully deleted!');
     return redirect('gsm');
 }