Having two dropdownmenu, choosing days and times inserted manually from sql. What is the best method of show at shopping cart which day and time the user chosen and added to the shopping cart.
my idea is under below.
index.blade.php
#extends('layouts.master')
#section('title')
Shopping Cart
#endsection
#section('content')
#foreach($products->chunk(3) as $productsChunk)
<div class="row">
#foreach($productsChunk as $products)
<div class="col-sm-4 col-md-4">
<div class="thumbnail">
<img src="{{ $products->imagePath }}" alt="..." class="img-responsive">
<div class="caption">
<h3>{{ $products->title }}</h3>
<p class="description">{{ $products->description }}</p>
<div class="clearfix">
<script type="text/javascript">
<div class="container">
<h2>Laravel Dependent Dropdown</h2>
<div class="form-group">
<label for="day">Select Day:</label>
<select name1="day" class="form-control" style="width:250px">
<option value="">--- Select Day ---</option>
#foreach ($days as $key => $value)
<option value="{{ $key }}">{{ $value }}</option>
#endforeach
</select>
</div>
<div class="form-group">
<label for="time">Select Time:</label>
<select name1="time" class="form-control"style="width:150px">
<option>--Time--</option>
#foreach ($times as $key => $value)
<option value="{{ $key }}"{{ ( $key == $selectedID) ? 'selected' : '' }}>{{ $value }}</option>
#endforeach
</select>
</select>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function ()
{
jQuery('select[name1="day"]').on('change',function(){
var dayID = jQuery(this).val();
if(dayID)
{
jQuery.ajax({
url : 'shopindex/getindex/' +dayId,
type : "GET",
dataType : "json",
success:function(data)
{
console.log(data);
jQuery('select[name1="day"]').empty();
jQuery.each(data, function(key,value){
$('select[name1="day"]').append('<option value="'+ key +'">'+ value +'</option>');
});
}
});
}
else
{
$('select[name1="day"]').empty();
}
});
});
</script>
<div class="container">
<div class="form-group">
<label for="days">Select Day:</label>
<select name1="day" class="form-control" style="width:250px">
<option value="">--- Select Day ---</option>
#foreach ($days as $key => $value)
<option value="{{ $key }}">{{ $value }}</option>
#endforeach
</select>
</div>
<div class="form-group">
<label for="time">Select Time:</label>
<select name2="time" class="form-control"style="width:250px">
<option value="">--Time--</option>
#foreach ($times as $key => $value)
<option value="{{ $key }}">{{ $value }}</option>
#endforeach
</select>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function ()
{
jQuery('select[name1="time"]').on('change',function(){
var dayID = jQuery(this).val();
if(dayID)
{
jQuery.ajax({
url : 'shopindex/getindex/' +dayID,
type : "GET",
dataType : "json",
success:function(data)
{
console.log(data);
jQuery('select[name2="time"]').empty();
jQuery.each(data, function(key,value){
$('select[name2="time"]').append('<option value="'+ key +'">'+ value +'</option>');
});
}
});
}
else
{
$('select[name2="time"]').empty();
}
});
});
</script>
<div class="pull-left price">${{ $products->price }}</div>
<a href="{{ route('product.addToCart', ['id' => $products->id]) }}"
class="btn btn-success pull-right" role="button">Add to cart</a>
</div>
</div>
</div>
</div>
#endforeach
</div>
#endforeach
#endsection
ProductController.php
public function getIndex()
{
$products = Product::all();
$days = DB::table('days')->pluck("name1","id");
$times = DB::table('times')->pluck("name2","id");
return view('shop.index',compact('products','days','times'), ['products' => $products]);
}
shopping-cart.blade.php
#section('content')
#if(Session::has('cart'))
<div class="container-fluid">
<div class="row">
<div class="col-md-6 m-auto">
#foreach ($products as $product)
<li class="list-group-item">
<img src="{{ $product['item']['imagePath'] }}" height="120" width="100">
<span class="badge badge-secondary">Quantity: {{ $product['qty'] }}</span>
<span class="badge badge-secondary">Item: {{ $product['item']['title'] }}</span>
<span class="badge badge-secondary">Item: {{ $product['item']['day'] }}</span>
<span class="badge badge-secondary">Item: {{ $product['item']['time'] }}</span>
<span class="badge badge-secondary">Price: ${{ $product['price'] }}</span>
<div class="btn-group">
<button type="button" class="btn btn-primary btn-md dropdown-toggle" data-toggle="dropdown">Action
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li>Reduce by 1
</li>
<li>Reduce All</li>
</ul>
</div>
</li>
#endforeach
</ul>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-4 m-auto">
<strong>Total Cost: ${{ $totalPrice }}</strong>
</ul>
</div>
</div>
</div>
<hr>
<div class="container-fluid">
<div class="row">
<div class="col-md-4 m-auto">
<button>Checkout</button>
</div>
</div>
</div>
#else
<div class="container-fluid">
<div class="row">
<div class="col-md-4 m-auto">
<h1>No item to cart</h1>
</ul>
</div>
</div>
</div>
#endif
#endsection
my idea at index.blade.php
<select name2="time" class="form-control"style="width:250px">
<option value="">--Time--</option>
#foreach ($times as $key => $value)
<option value="{{ $key }}"{{ ( $key == $times_id) ? 'selected' : '' }}>{{ $value }}</option>
#endforeach
</select>
but $times_id is undefined
Related
I am insert data product with images in dashboard, when I try to order the product I have error 404 not found and the URL showing value database in table like http://127.0.0.1:8000/shops/order/[%7B%22id%22:2,%22category_id%22:1,%22name_product%22:%22asdasd%22,%22harga%22:123123123,%22image%22:%22product-images//HapOzHmJPim1kIfmIeCM21xesCnIbR5Z7lpzcO8M.jpg%22,%22published_at%22:null,%22created_at%22:%222022-05-23T16:25:00.000000Z%22,%22updated_at%22:%222022-05-23T16:25:10.000000Z%22,%22kategori%22:%7B%22id%22:1,%22name_category%22:%22Top%22,%22created_at%22:%222022-05-23T16:22:40.000000Z%22,%22updated_at%22:%222022-05-23T16:22:40.000000Z%22%7D%7D].
But when I am insert data product without images in dashboard, and then I try to order the product is successful.
This is my route
Route::post('/shops/order/{shop:id}', [OrderController::class, 'store']);
This is OrderController
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Order;
use App\Models\User;
use App\Models\Shop;
class OrderController extends Controller
{
public function store(Request $request)
{
$createOrder = $request->validate([
'user_id' => 'required',
'name_product_id' => 'required',
'size' => 'required',
'no' => 'required',
'address' => 'required'
]);
Order::create($createOrder);
return redirect('shops/order/{shop:id}')->with('success', 'Order is successfully!');
}
}
This is my views
#extends('layouts.main')
#section('container')
<div class="container">
<div class="row mt-5">
#foreach ($shops as $shop)
<div class="card mb-3">
<div class="row g-0">
<div class="col-md-4">
<img src="{{ asset('storage/' . $shop->image) }}" alt="{{ $shop->name_product }}" class="img-fluid rounded-start" style="max-height: 400px; overflow:hidden">
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">{{ $shop->name_product }}</h5>
<p>Jenis {{ $shop->category->name_category }}</p>
<p class="card-text fw-bold">Rp.{{ $shop->price }}</p>
</div>
</div>
</div>
</div>
#endforeach
</div>
<div class="row mt-5">
<div class="col align-self-center">
#if (session()->has('success'))
<div class="alert alert-success text-center" role="alert">
{{ session('success') }}
</div>
#endif
</div>
</div>
<form method="POST" action="/shops/order/{{ $shops }}" class="row g-2" enctype="multipart/form-data">
#csrf
<h3 class="text-center mt-2">Detail Delivery</h3>
<div class="col-md-6">
<div class="mb-3">
<select class="form-select" name="user_id" hidden>
#foreach ($users as $name)
<option value="{{ $name->id }}">{{ $name->id }}</option>
#endforeach
</select>
</div>
<div class="mb-3">
<select class="form-select" name="name_produk_id" hidden>
#foreach ($shops as $shops_id)
<option value="{{ $shops_id->id }}">{{ $shops_id->id }}</option>
#endforeach
</select>
</div>
<div class="mb-3">
<label for="address" class="form-label">Address</label>
<textarea class="form-control" #error('address') is-invalid #enderror id="address" name="address" required>
</textarea>
</div>
</div>
<div class="col-md-4">
<label for="size" class="form-label mt-3">Select size :</label>
<select class="form-select" name="size">
<option selected>S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
</select>
<div class="mt-3">
<label for="no" class="form-label">Nomor Whatsapp</label>
<input class="form-control" #error('no') is-invalid #enderror id="no" name="no" required autofocus">
</div>
<button type="submit" class="btn btn-primary mt-5">Buy Now</button>
</div>
</form>
</div>
#endsection
I have a form with a filter and a submit button. I would like to display a pdf in an embed tag on the same page with the filter fields used when generating the pdf with Dompdf. Thanks in advance.
here is the form :
#section('content')
<!-- Your html goes here -->
<div class='panel panel-default'>
<div class='panel-heading'>Customer Statement</div>
<div class='panel-body'>
<form method='get' action="{{ route('getStatement') }}" id="statementForm">
#csrf
<div class="row">
<div class='col-sm-6 form-group'>
<div class="form-group col-6">
<label for="start_date"><strong>Start Date</strong></label>
<input type="date" required name="start_date" value="{{ date('Y-m-d') }}"
class="form-control" id="start_date">
</div>
</div>
<div class='col-sm-6 form-group'>
<div class="form-group col-6">
<label for="end_date"><strong>End Date</strong></label>
<input type="date" required name="end_date" value="{{ date('Y-m-d') }}"
class="form-control" id="end_date">
</div>
</div>
</div>
<div class='col-sm-12 form-group'>
<label> Customers :</label>
<select style="font-size: 12px; width:100%" id="customer_id" name="customer_id"
class="select2 mb-2 select2-multiple">
<option value=''> Choose </option>
#if ($customers)
#foreach ($customers as $item)
#php $selected = ''; #endphp
#if (isset($customerdirect) == $item->id)
#php $selected = 'selected'; #endphp
#endif
<option data-name="{{ $item->name }}" value='{{ $item->id }}' {{ $selected }}>
{{ $item->name }} </option>
#endforeach
#endif
</select>
</div>
</div>
<div class='panel-footer'>
<input type='submit' class='btn btn-success' value='Generate'/>
</div>
</form>
</div>
#endsection
the code in controller
public function getStatement(Request $request)
{
$pdf = PDF::loadView('customerslocations::customerstatementpdf');
return $pdf->stream();
}
In my Laravel-5.8 project, I am trying to child name (text) on select list in edit form.
I have this table:
CREATE TABLE `goal_types` (
`id` int(11) NOT NULL,
`name` varchar(200) NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`max_score` int(11) DEFAULT 0,
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Model
class GoalType extends Model
{
public $timestamps = false;
protected $table = 'goal_types';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'parent_id',
'max_score',
];
protected $casts = [];
public function children()
{
return $this->hasMany('App\Models\GoalType', 'parent_id');
}
public function parent()
{
return $this->hasOne(App\Models\GoalType::class, 'id', 'parent_id');
}
}
Controller
public function index()
{
$categories = GoalType::with('children')->whereNull('parent_id')->get();
return view('goal_types.index')->with('categories', $categories);
}
public function create()
{
return view('goal_types.create');
}
public function store(StoreGoalTypeRequest $request)
{
$data = GoalType::create([
'name' => $request->name,
'parent_id' => $request->parent_id,
'max_score' => $request->max_score,
]);
Session::flash('success', 'Goal Type is created successfully');
return redirect()->route('goal_types.index');
}
I have a modal form for the edit
view
<div class="row">
<div class="col-md-8">
<div class="card card-secondary">
<div class="card-header">
<h3 class="card-title">Goal Type(s)</h3>
</div>
<div class="card-body">
<ul class="list-group">
#foreach ($categories as $category)
<li class="list-group-item">
#if ($category->children)
<ul class="list-group mt-2">
#foreach ($category->children as $child)
<li class="list-group-item">
<div class="d-flex justify-content-between">
{{ $child->name }}
<div class="button-group d-flex">
#can('goal_type_edit')
<button type="button" class="btn btn-sm btn-primary mr-1 edit-category" data-toggle="modal" data-target="#editCategoryModal" data-id="{{ $child->id }}" data-name="{{ $child->name }}">Edit</button>
#endcan
</div>
</div>
</li>
#endforeach
</ul>
#endif
</li>
#endforeach
</ul>
</div>
</div>
</div>
<div class="modal fade" id="editCategoryModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Edit Goal Type</h4>
<form action="" method="POST">
#csrf
#method('PUT')
<div class="modal-body">
<div class="form-group">
<label class="control-label"> Parent Goal Type:</label>
<select class="form-control select2bs4" data-placeholder="Choose Parent Goal Type" tabindex="1" name="parent_id" style="width: 100%;">
<option value="">Select Goal Type</option>
#foreach ($categories as $category)
<option value="{{ $category->id }}">{{ $category->name }}</option>
#endforeach
</select>
</div>
<div class="form-group">
<label class="control-label"> Name:<span style="color:red;">*</span></label>
<input type="text" name="name" class="form-control" value="" placeholder="Category Name" required>
</div>
<div class="form-group">
<label class="control-label"> Max. Weight (%):</label>
<input type="number" name="max_score" class="form-control" value="" step="0.01" placeholder="Enter maximum weight here: 15, 50, 75 etc" style="width: 100%;">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Update</button>
</div>
</div>
</form>
</div>
</div>
</div>
When I click on edit from the index a modal form should popup to display the child name where the parent_id equals the id of the parent as it is in the database. But the select dropdown value/text is not displaying anything until when I click on the select dropdown.
How do I modify
#foreach ($categories as $category)
<option value="{{ $category->id }}">{{ $category->name }}</option>
#endforeach
in the edit to achieve that (displaying the name of the select child on the dropdown)?
Thanks
In your edit view you must pass your category id in your form action like this action="{{ route('admin.categories.update' , $category->id) }}" and then compare it with parent_id and in your category model you have to pass children.
category model:
public function children()
{
return $this->hasMany(GoalType::class, 'parent_id' , 'id')->with('children');
}
edit.blade.php view
<div class="col-md-12">
<label for="parent_id" class="form-control-label">parents category name</label>
<select class="form-control" data-toggle="select" data-live-search="true" name="parent_id" id="parent_id">
<option value="0" {{ $category->parent_id === 0 ? 'disabled' : '' }} selected> - Default</option>
#foreach(\App\Models\Category::latest()->get() as $cate)
<option value="{{ $cate->id }}" {{ $cate->id === $category->parent_id ? 'selected' : '' }} {{ $cate->id === $category->id ? 'disabled' : '' }} {{ $cate->id === $category->parent_id ? 'disabled' : '' }}>{{ $cate->name }}</option>
#endforeach
</select>
</div>
how can I create a submit button that can show the pdf result of my form to print it directly?
this is my code below
<form method="post" action="{{ url('dashboard/generate') }}" enctype="multipart/form-data" id="form-ui">
{{ csrf_field() }}
<div class="col-md-6 col-xs-12">
<label for="exampleInputEmail1">Distributor</label>
<select name="distributor" id="type" class="form-control">
<option value="">Choose Distributor</option>
#foreach ($distributor as $item)
<option value="{{ $item->id }}">{{ $item->name }}</option>
#endforeach
</select>
</div>
<div class="col-md-6 col-xs-12">
<label for="exampleInputEmail1">Select Event</label>
<select name="event" id="type" class="form-control">
<option value="">Choose Event</option>
#foreach ($event as $item)
<option value="{{ $item->id }}">({{ $item->events->date }}, {{ $item->time }}, {{ $item->events->stage }})-{{ $item->title }}</option>
#endforeach
</select>
</div>
<div class="col-md-12 col-xs-12" style="margin-top: 10px;">
<button class="btn btn-success" type="submit" onclick="myFunction()">SUBMIT</button>
</div>
</form>
<script>
function myFunction() {
window.print();
}
</script>
but it just print the current page (the form page). any advice i can try?
try this onsubmit jquery event
<div class="col-md-12 col-xs-12" style="margin-top: 10px;">
<button class="btn btn-success" type="submit" name="submit">SUBMIT</button>
</div>
<script>
$(document).ready(function(){
$('body').on('submit', '.formsubmit', function(e) {
alert(1);
});
I have controller where I save invoice, but it is option to add item, bank and company. When I want to save the item and return to the invoice view, there is a problem:
TokenMismatchException
in VerifyCsrfToken.php (line 68)
or I refresh page I get an error: HttpException
This is my controller:
public function create()
{
$banks = Bank::all();
$methods = Payment_method::pluck('name_payment', 'id');
$users = User::pluck('name', 'id');
$items = Item::all();
$vats = Vat::all();
$companies = Company::all('name', 'id');
$numberProform = $this->setNumberProform();
if (isset($_COOKIE["addInvoiceForm"])) {
$previousData = $_COOKIE["addInvoiceForm"];
$previousData = unserialize($previousData);
return view('invoice.addInvoice', compact('items', 'companies', 'users', 'vats', 'numberProform', 'methods', 'banks', 'previousData'));
}
return view('invoice.addInvoice', compact('items', 'companies', 'users', 'vats', 'numberProform', 'methods', 'banks'));
}
public function store(Request $request)
{
if ($request->add === 'item') {
setcookie('addInvoiceForm', serialize($request->input()), time() + (86400 * 30), "/");
return redirect('addItem');
}
$this->validation($request);
$input = Req::all();
$invoice = Invoice::create($input);
$i = 1;
while ($request->has('item_' . $i)) {
$invoice->items()->attach([$request->{'item_' . $i} => ['quantity' => $request->{'quantity_' . $i}]]);
$i++;
}
return redirect('listInvoice');
}
view addInvoice.blade.php:
#extends('layouts.app')
#section('content')
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0">
<div class="panel panel-default">
{!! Form::open(['url' => 'saveInvoice', 'method' => 'post', 'class' => 'form-horizontal']) !!}
{{ csrf_field() }}
<div class="panel-heading">
<h2>Proforma nr {{$numberProform}}</h2>
</div>
<div class="form-group">
<div class="col-sm-12">
{!! Form::hidden('number', $numberProform) !!}
<span>UWAGA: PRO FORMA nie jest dokumentem księgowym i nie jest podstawą do odliczenia VAT.</span>
</div>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="row">
{!! Form::hidden('proforma', "1") !!}
{!! Form::hidden('user_id', \Illuminate\Support\Facades\Auth::user()->getAuthIdentifier()) !!}
<div class="form-group {{ $errors->has('place_issue') ? ' has-error' : '' }}">
<div class="col-sm-4 control-label">
{!! Form::label('place_issue', 'Miejsce:') !!}
</div>
<div class="col-sm-6">
{!! Form::text('place_issue', $previousData['place_issue'], ['class' => 'form-control']) !!}
#if ($errors->has('place_issue'))
<span class="help-block"><strong>{{ $errors->first('place_issue') }} </strong></span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('date_issue') ? ' has-error' : '' }}">
<div class="col-sm-4 control-label">
{!! Form::label('date_issue', 'Data wystawienia:') !!}
</div>
<div class="col-sm-6">
{!! Form::date('date_issue', $previousData['date_issue'], ['class' => 'form-control']) !!}
#if ($errors->has('date_issue'))
<span class="help-block"><strong>{{ $errors->first('date_issue') }} </strong></span>
#endif
</div>
</div>
<div class="form-group{{ $errors->has('date_payment') ? ' has-error' : '' }}">
<div class="col-sm-4 control-label">
{!! Form::label('date_payment', 'Zapłata do:') !!}
</div>
<div class="col-sm-6">
{!! Form::date('date_payment', $previousData['date_payment'], ['class' => 'form-control']) !!}
#if ($errors->has('date_payment'))
<span class="help-block"><strong>{{ $errors->first('date_payment') }} </strong></span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('description') ? ' has-error' : '' }}">
<div class="col-sm-4 control-label">
{!! Form::label('description', 'Opis:') !!}
</div>
<div class="col-sm-6">
{!! Form::text('description', $previousData['description'], ['class' => 'form-control']) !!}
#if ($errors->has('description'))
<span class="help-block"><strong>{{ $errors->first('description') }} </strong></span>
#endif
</div>
</div>
{{------------FIRMA------------}}
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
<div class="col-sm-4 control-label">
<label for="company_id">Nazwa firmy</label>
</div>
<div class="col-sm-6">
<select name="company_id" id="company_id" class="form-control">
#foreach($companies as $company)
<option
value="{{$company->id }}" {{ $company->id==$previousData['company_id'] ? 'selected' : '' }}>
{{ $company->name }}
</option>
#endforeach
</select>
#if ($errors->has('company_id'))
<span class="help-block"><strong>{{ $errors->first('company_id') }} </strong></span>
#endif
</div>
<div class="col-sm-2">
<a href="{{ url('addCompany') }}" class="btn btn-success">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
</div>
<div class="form-group">
<div class="col-sm-4 control-label">
{!! Form::label('bank_id', 'Bank:') !!}
</div>
<div class="col-sm-6">
<select class="form-control control-label" name="bank_id">
#foreach($banks as $bank)
<option value="{{$bank->id}}" {{ $bank->id==$previousData['bank_id']?'selected':''}}>
{{$bank->label}} ({{$bank->number_bank}});
</option>
#endforeach
</select>
</div>
<div class="col-sm-2">
<a href="{{ url('addBank') }}" class="btn btn-success">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
</div>
<div class="form-group {{ $errors->has('item_id') ? ' has-error' : '' }}">
<div class="col-sm-4 control-label">
{!! Form::label('item_1_id', 'Dodaj przedmioty:') !!}
</div>
<div class="col-sm-6">
<select class="form-control control-label search-item">
#foreach($items as $item)
<option value="{{$item->id}}">
{{$item->name}}
</option>
#endforeach
</select>
</div>
<div class="col-sm-2">
<button type="submit" name="add" value="item" href="{{ url('addItem') }}" class="btn btn-success">
<span class="glyphicon glyphicon-plus"></span>
</button>
</div>
</div>
<div class="col-sm-12">
<div class="items-table-wr">
<table class="table table-hover items-table">
<tr>
<th>nazwa</th>
<th>vat</th>
<th>jednostka</th>
<th>cena netto</th>
<th>cena brutto</th>
<th>ilość</th>
<th>suma</th>
<th></th>
</tr>
<tbody class="items-list">
</tbody>
</table>
</div>
</div>
<div class="form-group {{ $errors->has('payment_method_id') ? ' has-error' : '' }}">
<div class="col-sm-4 control-label">
{!! Form::label('payment_method_id', 'Metoda płatności:') !!}
</div>
<div class="col-sm-6">
{!! Form::select('payment_method_id', $methods, ['class' => 'form-control']) !!}
#if ($errors->has('payment_method_id'))
<span class="help-block"><strong>{{ $errors->first('payment_method_id') }} </strong></span>
#endif
</div>
</div>
<div class="form-group">
<div class="col-sm-6 col-sm-offset-4 text-right">
<button type="submit" class="btn btn-primary">Zapisz proformę
<span class="glyphicon glyphicon-ok"></span></button>
</div>
</div>
{{--<pre>--}}
{{-- {{print_r($previousData)}}--}}
{{--</pre>--}}
{!! Form::close() !!}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
#endsection
I add that the form is csrf token ({{csrf_field() }}).
I have no idea what it is, someone can help me? :)