Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // form.blade.php
- {{ csrf_field() }}
- <input type="hidden" name="id" value="{{ $league->id ?? null }}">
- <!-- Name -->
- <div class="form-group">
- <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Name <span
- class="required">*</span>
- </label>
- <div class="col-md-6 col-sm-6 col-xs-12">
- <input type="text" id="name" name="name" class="form-control col-md-7 col-xs-12"
- value="{{old('name', $league->name ?? null)}}">
- </div>
- </div>
- // create.blade.php
- <form id="new-leagues-form" data-parsley-validate class="form-horizontal form-label-left" action="{{ route('leagues.store') }}" method="POST">
- @include('leagues/form')
- </form>
- // edit.blade.php
- <form class="form-horizontal form-label-left" action="{{ route('leagues.update', ['id' => $league->id]) }}" method="POST">
- {{ method_field('PUT') }}
- @include('leagues/form', ['league' => $league])
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement