3 months ago

How to remove url path from request paramters

Posted 3 months ago by namht1st

Hi everyone,

I am having problems with the request paramters suddenly include url path as below:

use Illuminate\Http\Request;
public function create(Request $request)
        $data = $request->all();
        $validator = Validator::make($data, [
            'name' => 'string|required',
            'code' => 'string|required',
            'note' => 'string'
	if ($validator->fails()) {
            return responseErrorsAjaxRequest(createValidatorMessages($validator));
array:6 [▼
  "name" => "Supervisor"
  "code" => "SPV"
  "note" => "Supervisor"
  "select-permission-20" => "on"
  "select-permission-15" => "on"
  "/settings/authorization/roles/create" => null

Can anyone tell me why and how to handle it

Thanks in advance

Please sign in or create an account to participate in this conversation.