public function pagination()
 {
     $url_actual = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
     $url_actual = explode('?', $url_actual);
     $insti = Institution::orderBy('id', 'desc')->paginate(env('PAG'));
     $insti->setPath($url_actual[0]);
     return $insti;
 }
예제 #2
0
<?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>
예제 #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $institutions = Institution::orderBy('name', 'asc')->paginate(20);
     return view('sysadmin.institutions.index', compact('institutions'));
 }