Reputation: 47
This is my script code in Laravel:
<?php
$surat_masuk = DB::table('app_suratmasuk')->where('disposisi','like','%**{{ Session::get('fid') }}**%')->count();
?>
<span class="notif-alert ">{{ $surat_masuk }}</span>
I know , I have a mistake when adding {{ Session::get('fid') }}
. I want to ask, how to write that code to show {{ Session::get('fid') }}
because this script is in PHP syntax under PHP script.
Upvotes: 1
Views: 124
Reputation: 7504
Use the following code:
$surat_masuk = DB::table('app_suratmasuk')
->where('disposisi','like', '%' . Session::get('fid') . '%')->count();
Upvotes: 1