name) ? $firstUser->name : ''; // Access the 'name' property of the first user } $task = DB::table('php_submits_submission')->where('username', "$sess_name")->first(); $username = $task->username; $userfile = $task->userfile; $ket = htmlspecialchars($task->ket); $actual = storage_path("app/private/{$username}/{$userfile}"); $php_output = shell_exec("PHP $actual 2>&1"); $test = str_replace(array("\r\n","\r","\n"," "),"",htmlspecialchars($php_output)); return view('php.student.task.result_submssion_task',[ 'result_up' => $test, ]); // echo "$value == $sess_name"; } function get_session(){ if (Auth::check()) { $value = Auth::user()->name; return $value; } } }