use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Contracts\Validation\Validator;
protected function failedValidation(Validator $validator)
{
throw new HttpResponseException(response()->json(
[
'errors' => $validator->errors(),
'status' => true
],
400
));
}
Please note that iconv('UTF-8', 'ASCII//TRANSLIT', ...) doesn't work properly when locale category LC_CTYPE is set to C or POSIX. You must choose another locale otherwise all non-ASCII characters will be replaced with question marks. This is at least true with glibc 2.5.
input = document.querySelector('#my');
input.value = 'Вставляемый текст';
input.dispatchEvent(new KeyboardEvent('keydown', { bubbles: true }));
input.dispatchEvent(new KeyboardEvent('keypress', { bubbles: true }));
input.dispatchEvent(new KeyboardEvent('keyup', { bubbles: true }));
input.dispatchEvent(new Event('input', { bubbles: true }));
input.dispatchEvent(new Event('change', { bubbles: true }));
cat sites.json | jq -r '.sites[] | "\(.title)\tadmin\t\(.admin[])\n\(.title)\tfront\t\(.front[])"' | sort -u | fzf -m --delimiter "\t" --nth 1,2 | awk '{print $3}'
#!/bin/bash
select site in $(jq -r '.sites[].title' sites.json)
do
select area in "admin" "front"
do
# get links for "area"
links=$(jq '.sites[] | select(.title == "'${site}'") | .'${area}' |.[]' sites.json)
# here you can do whatever you want - iterate through links, opening them with xdg-open, or just print them out
echo $links
break
done
break;
done
select area in "admin" "front"
select area in $(jq -r '.sites[] | select(.title == "'${site}'") | keys | .[] | select(. != "title")' sites.json)
for a in 1 2; do
for b in 1 3; do
select list; do
while something; do
break
done
done
done
done
jsonlist="$(jq '.[][]|keys[]' sites.json|tr -d \")"
select action in ${jsonlist};do
echo "[$action]"
test "$action" == "title" && break
newlist="$(jq ".[][][\"$action\"][]" sites.json)"
echo "$newlist"
done