mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 20:44:13 +00:00
30 lines
551 B
PHP
30 lines
551 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Auth;
|
|
|
|
class UserController extends Controller
|
|
{
|
|
|
|
|
|
/**
|
|
* Display the specified resource.
|
|
*
|
|
* @param \App\ChinaBankSlip $chinaBankSlip
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function show(Request $request)
|
|
{
|
|
|
|
$user = Auth::user();
|
|
return $user->loadMissing('notifications');
|
|
}
|
|
|
|
public function notifications()
|
|
{
|
|
return auth()->user()->unreadNotifications()->limit(5)->get()->toArray();
|
|
}
|
|
}
|