Browse Source

Update formfield package

pull/4/head
Nafies Luthfi 9 years ago
parent
commit
ddcac13eef
  1. 6
      composer.json
  2. 12
      composer.lock
  3. 3
      resources/views/products/index.blade.php
  4. 4
      resources/views/products/partials/forms.blade.php

6
composer.json

@ -6,11 +6,11 @@
"type": "project", "type": "project",
"require": { "require": {
"php": ">=5.6.4", "php": ">=5.6.4",
"barryvdh/laravel-debugbar": "^2.0",
"laracasts/flash": "~2",
"laravel/browser-kit-testing": "^1.0", "laravel/browser-kit-testing": "^1.0",
"laravel/framework": "5.4.*", "laravel/framework": "5.4.*",
"luthfi/formfield": "^0.1.3",
"barryvdh/laravel-debugbar": "^2.0",
"laracasts/flash": "~2"
"luthfi/formfield": "0.1.5"
}, },
"require-dev": { "require-dev": {
"fzaninotto/faker": "~1.4", "fzaninotto/faker": "~1.4",

12
composer.lock

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "4dea6286629956973e12d8ccba163b46",
"content-hash": "9f299db76f1c1ca4e041bd599519ac10",
"packages": [ "packages": [
{ {
"name": "barryvdh/laravel-debugbar", "name": "barryvdh/laravel-debugbar",
@ -527,16 +527,16 @@
}, },
{ {
"name": "luthfi/formfield", "name": "luthfi/formfield",
"version": "0.1.4",
"version": "0.1.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nafiesl/FormField.git", "url": "https://github.com/nafiesl/FormField.git",
"reference": "bcacbdcf7289099e90adec803d28c44bf67a3fd4"
"reference": "8dd11f588cb97866af3d2351c3dcd58d710e7b1b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nafiesl/FormField/zipball/bcacbdcf7289099e90adec803d28c44bf67a3fd4",
"reference": "bcacbdcf7289099e90adec803d28c44bf67a3fd4",
"url": "https://api.github.com/repos/nafiesl/FormField/zipball/8dd11f588cb97866af3d2351c3dcd58d710e7b1b",
"reference": "8dd11f588cb97866af3d2351c3dcd58d710e7b1b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -563,7 +563,7 @@
} }
], ],
"description": "Form Field helper class for Laravel 5.3 with Twitter Bootstrap", "description": "Form Field helper class for Laravel 5.3 with Twitter Bootstrap",
"time": "2017-04-22T13:49:25+00:00"
"time": "2017-05-02T23:44:45+00:00"
}, },
{ {
"name": "maximebf/debugbar", "name": "maximebf/debugbar",

3
resources/views/products/index.blade.php

@ -3,6 +3,9 @@
@section('title', trans('product.list')) @section('title', trans('product.list'))
@section('content') @section('content')
<div class="pull-right">
{{ link_to_route('products.index', trans('product.create'), ['action' => 'create'], ['class' => 'btn btn-success pull-right']) }}
</div>
<h3 class="page-header"> <h3 class="page-header">
{{ trans('product.list') }} {{ trans('product.list') }}
<small>{{ trans('app.total') }} : {{ $products->total() }} {{ trans('product.product') }}</small> <small>{{ trans('app.total') }} : {{ $products->total() }} {{ trans('product.product') }}</small>

4
resources/views/products/partials/forms.blade.php

@ -1,7 +1,4 @@
@inject('unit', 'App\Unit') @inject('unit', 'App\Unit')
@if (! Request::has('action'))
{{ link_to_route('products.index', trans('product.create'), ['action' => 'create'], ['class' => 'btn btn-success pull-right']) }}
@endif
@if (Request::get('action') == 'create') @if (Request::get('action') == 'create')
{!! Form::open(['route' => 'products.store']) !!} {!! Form::open(['route' => 'products.store']) !!}
{!! FormField::text('name', ['label' => trans('product.name'), 'required' => true]) !!} {!! FormField::text('name', ['label' => trans('product.name'), 'required' => true]) !!}
@ -11,7 +8,6 @@
</div> </div>
{!! FormField::select('unit_id', $unit->pluck('name','id'), ['label' => trans('product.unit'), 'required' => true]) !!} {!! FormField::select('unit_id', $unit->pluck('name','id'), ['label' => trans('product.unit'), 'required' => true]) !!}
{!! Form::submit(trans('product.create'), ['class' => 'btn btn-success']) !!} {!! Form::submit(trans('product.create'), ['class' => 'btn btn-success']) !!}
{!! Form::hidden('cat', 'product') !!}
{{ link_to_route('products.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }} {{ link_to_route('products.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }}
{!! Form::close() !!} {!! Form::close() !!}
@endif @endif

Loading…
Cancel
Save