Do you have 'files' => true
option set in Form::open on create product page?
And if that's not the issue, could you post the code of create product view?
@endif
{{Form::open(array('url'=>'admin/products/create', 'files'=>true))}}
<p>
{{Form::label('category_id', 'Category')}}
{{Form::select('category_id', $categories)}}
</p>
<p>
{{Form::label('title') }}
{{Form::text('title')}}
</p>
<p>
{{Form::label('description') }}
{{Form::textarea('description')}}
</p>
<p>
{{ Form::label('price') }}
{{ Form::text('price', null, array('class'=>'form-price')) }}
</p>
<p>
{{Form::label('image', 'Chose an image') }}
{{Form::file('image')}}
</p>
{{Form::submit('Create Product', array('class'=>'secondary-cart-btn'))}}
{{Form::close()}}
Yesterday I removed this:
Route::filter('csrf', function()
{
if (Session::token() != Input::get('_token'))
{
throw new Illuminate\Session\TokenMismatchException;
}
});
from the filters.php and I was able to create product WITH image. Today I can only create products without pictures.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community