payment check3

This commit is contained in:
ilmedova 2020-03-26 20:29:46 +05:00
parent 0ee193149e
commit 7d38417171
1 changed files with 8 additions and 6 deletions

View File

@ -134,12 +134,14 @@ class HomeController extends Controller
$user = auth()->user();
if($user != null){
$user_check = User_sub::where('user_id',$user->id)->first();
$time = Carbon::parse($user_check->end_time)->format('Y-m-d h:i');
if($time >= now()->format('Y-m-d h:i')){
$subscribed = true;
}
else{
$subscribed = false;
if($user_check != null && $user_check->status == 1){
$time = Carbon::parse($user_check->end_time)->format('Y-m-d h:i');
if($time >= now()->format('Y-m-d h:i')){
$subscribed = true;
}
else{
$subscribed = false;
}
}
}
if(auth()->guest()){