@extends('layouts.master') @section('content')

Agregar nuevo mobiliario


@if($furniture->getErrors()->count() > 0)
    @foreach($furniture->getErrors()->all() as $error)
  • {{$error}}
  • @endforeach
@endif {{Form::model($furniture, [ 'action' => $furniture->exists ? ['AdminFurnituresController@update', $furniture->id] : 'AdminFurnituresController@store', 'method' => $furniture->exists ? 'PUT' : 'POST', 'files' => true ])}}
{{Form::label('name', 'Nombre corto')}} {{Form::text('name', NULL, ['class' => 'form-control'])}}
{{Form::label('description', 'Descripción')}} {{Form::textarea('specific_description', NULL, ['class' => 'form-control', 'rows' => 3])}}
{{Form::label('unitary', 'Unitario')}} {{Form::number('unitary', NULL, ['class' => 'form-control'])}}
{{Form::label('key', 'Clave')}} {{Form::text('key', NULL, ['class' => 'form-control'])}}
{{Form::label('delivery_time', 'Tiempo de entrega')}} {{Form::text('delivery_time', NULL, ['class' => 'form-control'])}}
{{Form::label('business_conditions', 'Condiciones comerciales')}} {{Form::text('business_conditions', NULL, ['class' => 'form-control'])}}
{{Form::label('category_id', 'Categoría')}} {{Form::select('category_id', ($furniture->category ? [] : [NULL => 'Sin especificar']) + FurnitureCategory::lists('name', 'id'), NULL, ['class' => 'form-control'])}}
{{Form::label('furniture_subcategory_id', 'Subcategoría')}} {{Form::select('furniture_subcategory_id',[], NULL,['class' => 'form-control','id' =>'subcategory_id'])}}
{{Form::label('image', 'Imagen')}} {{Form::file('image')}}
{{Form::submit('Guardar', ['class' => 'btn btn-warning btn-lg'])}}
{{Form::close()}}
@stop @section('script') @endsection