一、修改样式
修改 resources/assets/css/style.css
.notifications {
position: relative;
padding: 8px 15px 8px 25px;
color: #666;
border: none;
border-top: 1px dotted #eee;
background: transparent;
}
.notifications.unread {
background: #fff9ea !important;
}
执行 gulp
gulp
二、修改视图
修改 resources/views/notifications/new_message_notification.blade.php
三、注册路由
修改 routes/web.php
Route::get('notifications/{notification}', 'NotificationsController@show');
修改 app/Http/Controllers/NotificationsController.php
use Illuminate\Notifications\DatabaseNotification;
public function show(DatabaseNotification $notification)
{
$notification->markAsRead();
return redirect(request()->get('redirect_url'));
}
访问:http://127.0.0.1:8000/notifications 进行测试。