コード例 #1
0
ファイル: AreaController.php プロジェクト: Jimmies/MoziManage
 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();
     }
 }
コード例 #2
0
 public function __construct(Request $request)
 {
     $this->areas = Area::all('id', 'name');
     $this->streets = Street::all('id', 'name');
     $this->request = $request;
 }
コード例 #3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return Area::all();
 }
コード例 #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $areas = Area::all();
     return \View::make('Area/list_area', compact('areas'));
 }