public function checkVersion()
 {
     # code...
     $settings = ExamAppSetting::first();
     $error = 0;
     // $version = '2.1';
     $version = $settings->version;
     $path = "https://www.el-css.edu.om/exams/update.zip";
     return response()->json(compact('error', 'path', 'version'), 200, [], JSON_NUMERIC_CHECK);
 }
Beispiel #2
0
    /**
     * Check the current version of the software
     * @param  \Illuminate\Http\Request $request
     * @return \Illuminate\Http\Response
     */
    public function check(Request $request)
    {
        $settings = ExamAppSetting::first();
        $message = 'مرحبا بك';
        $error = 0;
        $randomize_questions = $settings->randomize_questions;
        $hide_questions = $settings->hide_questions;
        $server_time = time();
        $show_camera = $settings->show_camera;
        if ($request->input('version') < $settings->version) {
            $error = 1;
            $message = 'لديك نسخة قديمة من البرنامج المرجو
			تحميل اخر نسخة من الموقع';
        }
        return response()->json(compact('error', 'server_time', 'message', 'show_camera', 'hide_questions', 'randomize_questions'));
    }