public function anyData() { $datas = Area::all(); if ($datas) { foreach ($datas as &$data) { $url_edit = route('area.edit', $data['id']); $data['buttons'] = '<div class="btn-group">'; $data['buttons'] .= '<a href="' . $url_edit . '" class="btn btn-default edit" title="Edit"><i class="fa fa-edit"></i></a>'; $data['buttons'] .= '<a href="#self" class="btn btn-default delete" title="Delete" data-id="' . $data['id'] . '"><i class="fa fa-remove"></i></a>'; $data['buttons'] .= '</div>'; } return Datatables::of($datas)->make(true); } else { return $this->notFoundResponse(); } }
public function __construct(Request $request) { $this->areas = Area::all('id', 'name'); $this->streets = Street::all('id', 'name'); $this->request = $request; }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return Area::all(); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $areas = Area::all(); return \View::make('Area/list_area', compact('areas')); }