Support the ongoing development of Laravel.io →
Input Forms
Last updated 2 years ago.
0

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?

Last updated 9 years ago.
0
@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()}}
0

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.

0

Could you post your full code of what you have made with eshop?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

turtlesin turtlesin Joined 18 Apr 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.