/** * Bind data to the view. * * @param View $view * @return void */ public function compose(View $view) { $projectStatusOptions = [0 => 'Please Select'] + $this->status->getProjectStatus()->pluck('name', 'id')->toArray(); $conactOptions = [0 => 'Please Select'] + $this->contact->all()->pluck('full_name', 'id')->toArray(); $view->with('contactOptions', $conactOptions)->with('projectStatusOptions', $projectStatusOptions); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Contact::destroy($id); return redirect()->route('setup.contact.index'); }