app/Http/Controllers/UserCaptchaController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $t = date("h")+8;
        $now = date('Y-m-d',strtotime("+8 hours"));
        $new = date("F d, Y", strtotime($now));
        $user_captchas = UserCaptcha::where('user_id', auth()->user()->id)->first();
        $updated = date("F d, Y", strtotime($user_captchas->last_incode));
        if ($user_captchas->captcha_count <= 0) {
            return view('dashboard.renewal',compact('user_captchas'));
        }
        else {
            return view('dashboard.incode',compact('user_captchas'));
        }
    }
public function index ( ) { $ t = date ( " h " ) + 8 ; $ now = date ( 'Y-m-d' , strtotime ( " +8 hours " ) ) ; $ new = date ( " F d, Y " , strtotime ( $ now ) ) ; $ user_captchas = UserCaptcha :: where ( 'user_id' , auth ( ) -> user ( ) -> id ) -> first ( ) ; $ updated = date ( " F d, Y " , strtotime ( $ user_captchas -> last_incode ) ) ; if ( $ user_captchas -> captcha_count <= 0 ) { return view ( 'dashboard.renewal' , compact ( 'user_captchas' ) ) ; } else { return view ( 'dashboard.incode' , compact ( 'user_captchas' ) ) ; } }
Display a listing of the resource.
Display a listing of the resource .
//$posts = Post::where('title','Post Two')->get(); // $posts = Post::all(); // return view('dashboard.index');