I got this error
Whoops, looks like something went wrong.
but laravel.log file is empty. the problem is not with writing in this file because I get other errors.
Is there any other files laravel save logs in it?
what I want to do :
backend/agent/products/index.blade.php
<form action="" method="post" class="horizontal-form">
<div class="row">
<div class="col-md-3">
<label for="quantity">تعداد</label>
<input id="quantity" name="quantity" class="form-control text-center" type="text" value="1">
</div>
<div class="col-md-9">
<label class="control-label" for="seller">فروشنده</label>
<select name="seller" id="seller" class="form-control">
<option value="">انتخاب کنید</option>
@foreach ($product->users as $price_index => $price)
<option value=""> به قیمت تومان</option>
@endforeach
</select>
</div>
</div>
@foreach ($errors->all() as $error)
<li></li>
@endforeach
<div class="row">
<div class="col-md-12">
<br>
<button type="submit" class="btn btn-success">افزودن به سبد خرید</button>
</div>
</div>
</form>
backend/agent/ProductController.php
public function addToCart(Request $request, $id, $name)
{
$this->validate($request, [
'quantity' => 'required',
'seller' => 'required'
]);
$quantity = $request->input('quantity');
Cart::add($id, $name, $quantity, 9.99);
return redirect()->action('Backend\Agent\ProductController@index');
}
web.php
Route::get('products/addtocart/{id}/{name}', 'ProductController@addToCart');
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2sifn9h
via IFTTT
Aucun commentaire:
Enregistrer un commentaire