Which hosting plan is better?
Why you add the id to store function?
It is not necessary?
Or maybe you are confusing store with update?
The question is, if this is not what you want, then what do you want to achieve?
Hi i have problem when generate pdf report from laravel dom pdf?
can help me or share advice for fixed problem?
and use git
and use git
Which hosting plan is better?
Thanks alot ✊
<div class=”card-footer”>
<button class=”btn btn-primary”>Is it ok?</button>
</div>
</div>
</form>
ReportController.php
public function show (Order $order)
{
return view(‘Home.report’, compact(‘order’));
}
public function store (Request $request)
{
$report = new Report($request->all());
$report->date = $request->date;
$report->time = $request->time;
$report->category_id = category_id;
$report->save();
}
web.php
Route::get(‘/internets’, ‘InternetController@index’)->name(‘internets’);
Route::post(‘/internets/store’, ‘InternetController@store’)->name(‘internets.store’);
Route::get(‘reports/show/{order}’, ‘ReportController@show’)->name(‘reports.show’);
Route::post(‘reports/store’, ‘ReportController@store’)->name(‘reports.store’);
InternetController.php
public function store(Request $request)
{
if (auth()->check()) {
$order = new Order($request->all());
$order->category_id = $request->category_id;
$order->user_id = auth()->user()->id;
$order->status = 0;
$order->description = $request->description;
$order->save();
alert()->success(‘ok’)->persistent(“ok”);
return redirect()->route(‘reports.show’, $order);
}
}
When I press save button. I see http://localhost:8000/reports/show/5 in address bar.
How to get this 5 for save the order.
show.blade.php
<form action=”{{ route(‘reports.store’) }}” method=”post”>
@csrf
<div class=”card”>
<div class=”table-responsive”>
<table class=”table”>
<thead>
<tr>
<th>first_name </th>
<th>last_name </th>
<th>mobile</th>
<th>city</th>
<th>category name</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ $order->user->first_name }}</td>
<td>{{ $order->user->last_name }}</td>
<td>{{ $order->user->mobile }}</td>
<td>{{ $order->user->city->city_name }}</td>
<td>{{ $order->categories->name }}</td>
</tr>
</tbody>
</table>
</div>
<div class=”card-body”>
<h3>Expert visit time</h3>
<div class=”row”>
<div class=”col-md-7″>
<div class=”input-group”>
<div class=”input-group-prepend”>
<span class=”input-group-text cursor-pointer” id=”date”>
<i class=”fas fa-calendar-alt”></i>
</span>
</div>
<div class=”row”>
<div class=”col-sm-6″>
<input type=”text” name=”date” id=”inputDate” class=”form-control” placeholder=”date” aria-label=”date” aria-describedby=”date”>
</div>
<div class=”col-md-6″>
<div class=”input-group date” id=”datetimepicker3″ data-target-input=”nearest”>
<input type=”text” name=”time” class=”form-control datetimepicker-input” data-target=”#datetimepicker3″/>
<div class=”input-group-append” data-target=”#datetimepicker3″ data-toggle=”datetimepicker”>
<div class=”input-group-text”><i class=”fas fa-clock”></i></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=”col-md-5″>
<p class=”float-left m-0″>{{ $order->description }}</p>
</div>
</div>
dd($id);
}
No I get this error
Yes that’s normal, look at the route, you have to send the id.
It is not necessary?
Ask yourself, why you need the id.
Show the blade where save button is.
The question is, if this is not what you want, then what do you want to achieve?
can help me or share advice for fixed problem?
public function print_pdf(Request $request)
{
$start_date = $request->start_date;
$end_date = $request->end_date;
$ppra = DB::select(‘EXEC SPGetPPRA ?,?’, array($start_date, $end_date));
$pdf = PDF::loadView(‘ppra.pdf’, compact(‘ppra’));
// $pdf->setPaper(‘a4’, ‘potrait’);
return $pdf->stream();
}
can help me or share advice for fixed problem?
what’s the exact error? 500 it’s just error code
just like you tell doctor that you are ill, but you dont tell what you feel

Lol, that’s a different way to “speak but say nothing”