UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_2ae1a8506d80
/
app
/
Http
/
Requests
/
Admin
/
Courses
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
ModuleRequest.php
<?php namespace EstudioLMS\Http\Requests\Admin\Courses; use EstudioLMS\Http\Requests\Request; class ModuleRequest extends Request { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $id = $this->get('id'); $courseId = $this->get('course_id'); if ($this->method() == 'PUT') { return [ 'name' => 'required|unique_with:modules,course_id,'.$id ]; } else { return [ 'name' => 'required|unique_with:modules,course_id' ]; } } public function messages() { return [ 'name.unique_with' => trans('module.duplicated_name'), ]; } /** * Get the proper failed validation response for the request. * * @param array $errors * @return \Symfony\Component\HttpFoundation\Response */ public function response(array $errors) { if ($this->ajax() || $this->wantsJson()) { $return = [ 'fail' => true, 'errors' => $errors ]; return \Response::json($return); } return $this->redirector->to($this->getRedirectUrl()) ->withInput($this->except($this->dontFlash)) ->withErrors($errors, $this->errorBag); } }
Copyright © 2026 - UnknownSec