@extends('layouts.master') @section('title', 'Citys') @section('links') @endsection @section('content')

Citys Management

Cities


@foreach ($citys as $city) @endforeach
Sno. State Name City Name Action
{{++$i}}. {{$city->state_name}} {{$city->city_name}} {{ Form::open(array('url' => 'citys/' . $city->city_id)) }} {{ Form::hidden('_method', 'DELETE') }} {{ Form::button('', ['type' => 'submit', 'class' => 'btn circle-delete del','onclick'=>"return confirm('Are you sure you want to delete this item?');"] ) }} {{ Form::close() }}
@if(!empty($editcitys))

Update City Master *

{{ Form::model($editcitys, array('action' => array('CityController@update', $editcitys[0]->city_id), 'method' => 'PUT')) }}
* {!! Form::select('country_id', [null => 'Select Country'] + $countrys, $editcitys[0]->country_id ,['class'=>'form-control'],['class'=>'form-control','required'=>'required'])!!}
* {!! Form::select('state_id', [null => 'Select State'] + $states, $editcitys[0]->state_id ,['class'=>'form-control'],['class'=>'form-control','required'=>'required'])!!}
* {{ Form::text('city_name', $editcitys[0]->city_name, array('class' => 'form-control onlytext' ,'required'=>'required')) }}
{{ Form::submit('Update City!', array('class' => 'btn btn-primary')) }} {{ Form::close() }} @else

Add City Master

{{ Form::open(array('url' => 'citys','action' => array('CityController@store'), 'method' => 'POST')) }}
* {!! Form::select('country_id', [null => 'Select Country'] + $countrys, ['class'=>'form-control'],['class'=>'form-control','required'=>'required'])!!}
* {!! Form::select('state_id', [null => 'Select State'] + $states, ['class'=>'form-control'],['class'=>'form-control','required'=>'required'])!!}
* {{ Form::text('city_name', Input::old('city_name'), array('class' => 'onlytext form-control','placeholder'=>('Enter City Name'))) }}
{{ Form::submit('Create City!', array('class' => 'btn btn-primary')) }} {{ Form::close() }} @endif
@endsection @section('scripts') @endsection