datetime notif

This commit is contained in:
Pusdatin BPKD Jkt
2022-11-08 14:27:04 +07:00
parent 2d885eadd1
commit a96f71d5e8
2 changed files with 2 additions and 2 deletions
@@ -86,7 +86,7 @@ class NotifikasiController extends Controller
public function getNotif(Request $request) public function getNotif(Request $request)
{ {
$notif = Notifikasi::where(["userid"=>Auth::user()->id,"is_read"=>0]); $notif = Notifikasi::selectRaw("jenis,url,TO_CHAR(created_at,'DD/MM/YYYY HH24:MI') as chat_date,message")->where(["userid"=>Auth::user()->id,"is_read"=>0]);
$notif = [ $notif = [
"jml"=>$notif->count(), "jml"=>$notif->count(),
"data"=>$notif->orderBy("created_at","desc")->skip(0)->take(5)->get() "data"=>$notif->orderBy("created_at","desc")->skip(0)->take(5)->get()
+1 -1
View File
@@ -488,7 +488,7 @@ refreshNotif = ()=>{
<h3 class="dropdown-item-title"><strong>`+ y.jenis +`</strong> <h3 class="dropdown-item-title"><strong>`+ y.jenis +`</strong>
<span class="float-right text-sm text-danger"></span> <span class="float-right text-sm text-danger"></span>
</h3> </h3>
<p class="text-sm">`+y.message+`</p> <p class="text-sm"><span class="text-muted">`+y.chat_date+`</span><br>`+y.message+`</p>
</div> </div>
</div> </div>
</a> </a>