@extends('layouts.app') @section('content')
@if(isset($product)) {{ Form::model($product, array('url' => route('product.update', ['id' => $product->id]), 'method' => 'POST')) }} {{ Form::hidden('_method', 'PATCH') }} @else {{ Form::open(array('url' => route('product.store'), 'method' => 'POST')) }} @endif

Add/Edit Product

{{Form::submit('Save')}}

@if(count($errors) > 0)
@foreach($errors->all() as $error)

{{ $error }}

@endforeach
@endif
{{Form::label('name', 'Name')}}*
{{Form::text('name', null, array('required' => 'required'))}}
{{Form::submit('Save')}}
{{ Form::close() }}
@endsection