create notification for each step done. Make unread message bold.

This commit is contained in:
weiweitoo
2018-07-25 10:05:18 +08:00
parent ad5a9970ea
commit 336e5e4ed3
8 changed files with 87 additions and 32 deletions
@@ -4,6 +4,8 @@ namespace App\Http\Controllers;
use App\ChinaBankSlip;
use App\Booking;
use App\User;
use App\Notification;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Validator;
@@ -80,6 +82,13 @@ class ChinaBankSlipController extends Controller
$booking->admin_status = 6;
$booking->save();
$userNotification = new Notification;
$userNotification->detail = "Your china bankslip for booking " . $booking->id . " is uploaded.";
$userNotification->link = "/booking/" . $booking->id . "/upload-po";
$userNotification->user_id = $booking->user_id;
$userNotification->save();
return response()->json(["message"=> "Success"],200);
}