I have a table on mysql and I want to show one of the fields, its the id
field and I want to show it on my email layout on Laravel. the id
field consist on some random code generated by the rand()
function.
and I've tried it this way:
but, the returned value on the email view is 0
.
// This is what I wrote on the email view
<td align="left" class="esd-block-text es-p15t es-p10b">
<p style="font-size: 16px; color: #777777;">Thank you for filling in the lost items form. Here are some details from your report .<br></p>
<p style="font-size: 16px; color: #777777;">first your report ticket number is <br></p>
<p style="font-size: 16px; color: #777777;"><br></p>
<p style="font-size: 16px; color: #777777;">Your details:<br></p>
<table style="width:100%" class="table table-striped table-bordered table-hover table-condensed">
I expect the output to be the id
from the id
field on database. But it turns out to be 0
.
Any idea why?
Edit
this is the controller:
$data = Dekripsi::create([
'id'=>mt_rand(),
'date' => Carbon::parse(request('date')),
'location' => request('location'),
'locationdetails' => request('locationdetails'),
'flightnumber' => request('flightnumber'),
'origin' => request('origin'),
'destination' => request('destination'),
'typeproperty' => request('typeofproperty'),
'other' => request('other'),
'itemimage' => $nama,
'name' => request('name'),
'email' => request('email'),
'phone' => request('phone'),
]);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire