/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $regions = Cache::remember('regions', 15, function () { return Region::orderBy('name')->get(); }); return response()->json(['data' => $regions], 200); }
public function populateDropdowns() { $populatecountry = Country::orderBy('created_at', 'asc')->paginate(100); $populatemunicipality = Municipality::orderBy('created_at', 'asc')->paginate(100); $populateregion = Region::orderBy('created_at', 'asc')->paginate(100); $populateschool_level = School_level::orderBy('created_at', 'asc')->paginate(100); $populateschool_type = School_type::orderBy('created_at', 'asc')->paginate(100); $populateacademic_year = Academic_year::orderBy('created_at', 'asc')->paginate(100); $populatetemplate = Template::orderBy('created_at', 'asc')->paginate(100); $site_code = Settings::first()->site_code; $site_title = Settings::first()->site_title; $owner = Settings::first()->owner; $street = Settings::first()->street; $barangay = Settings::first()->barangay; $zip_code = Settings::first()->zip_code; $contact = Settings::first()->contact; $fax = Settings::first()->fax; $tin = Settings::first()->tin; //$posts=Post::orderBy('created_at','desc')->paginate(15); //return view('general-settings',['populatecountry' => $populatecountry]); return view('general-settings')->with('populatecountry', $populatecountry)->with('populatemunicipality', $populatemunicipality)->with('populateregion', $populateregion)->with('populateschool_level', $populateschool_level)->with('populateschool_type', $populateschool_type)->with('populateacademic_year', $populateacademic_year)->with('populatetemplate', $populatetemplate)->with('site_code', $site_code)->with('site_title', $site_title)->with('owner', $owner)->with('street', $street)->with('barangay', $barangay)->with('zip_code', $zip_code)->with('contact', $contact)->with('fax', $fax)->with('tin', $tin); }
public function getRegion() { $region = Region::orderBy('created_at', 'desc')->paginate(10); //$posts=Post::orderBy('created_at','desc')->paginate(15); return view('region', ['region' => $region]); }
<?php $regions = \App\Region::orderBy('name', 'asc')->lists('name', 'id'); $institutions = \App\Institution::orderBy('name', 'asc')->lists('name', 'id'); ?> <div class="col-md-8 col-md-offset-2"> @if($submitButtonText=='Update') <div class="form-group"> {!! Form::label('name', 'School Name : ') !!} {!! Form::text('name', null, ['placeholder' => 'School Name', 'class' => 'form-control', 'value' => '{{ old("name") }}']) !!} </div> <div class="form-group"> {!! Form::label('year_establish', 'Year Establish : ') !!} {!! Form::input('date', 'year_establish', null, ['placeholder' => '', 'class' => 'form-control']) !!} </div> <div class="form-group"> {!! Form::label('status', 'Status : ') !!} {!! Form::select('status', array('Cluster Head' => 'Cluster Head', 'Polytechnic College' => 'Polytechnic College', 'College' => 'College', 'Institute' => 'Institute' ), $status, ['class' => 'form-control']) !!} </div>
/** * Display a listing of the resource. * * @return Response */ public function index() { $regions = Region::orderBy('region')->get(); return view('region.index', compact('regions')); }
* * @apiSuccess {Object[]} regions List of regions. * @apiSuccess {String} regions.name Region name. * @apiSuccess {String} regions.url Region url. * @apiSuccess {String} regions.country Region country code. * @apiSuccess {String} regions.hashtag Region hashtag. * * @apiExample {curl} Example usage: * curl -i http://avalog.io/api/v1/regions */ $app->get("regions", function (Request $request) { $country = $request::input("country"); if ($country) { $regions = Region::where("country", "=", $country)->orderBy("name")->get(); } else { $regions = Region::orderBy("name")->get(); } return response()->json(["regions", $regions]); }); /** * @api {get} /people/:username View a person * @apiName ViewPerson * @apiGroup People * * @apiParam {String} username Username * * @apiSuccess {Object} person Person. * @apiSuccess {String} person.name Name. * @apiSuccess {String} person.username Username. * @apiSuccess {String} person.timezone Timezone. * @apiSuccess {Object} [organization] Organization object.