Category : detach

I sent the below value from view to controller: in View: <input type="checkbox" name="Roles[]" value="{{$user->rolesTeams[$i]->pivot}}"/> In Controller: case ‘team-delete’: $input = $request[‘Roles’]; dd($input); Result: array:1 [▼ 0 => "{"user_id":"15","team_id":"2","user_type":"AppUser","role_id":"2"}" ] now How can I make this like: $user = user_id >> which should be 15 $team = team_id >> which whould be 2 $role = ..

Read more