/** * 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); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $phones = GsmNumber::all(); $breadcrumb = array(array('label' => 'Dashboard', 'url' => '/', 'class' => 'entypo-home'), array('label' => 'Manage GSM Numbers', 'url' => '/gsm', 'class' => '')); return view('admin.gsm.index')->with('phones', $phones)->with('breadcrumb', $breadcrumb); }