.social-list .social-list__items li > a[href*="vk.com"]::before {
content: '\f189';
}
Validator
$messages = array(
'required' => 'Поле :attribute должно быть заполнено.',
);
$validator = Validator::make($input, $rules, $messages);
app/lang/xx/validation.php
'custom' => array(
'email' => array(
'required' => 'Нам нужно знать ваш e-mail адрес!',
),
),
/**
* Sort data (for fun)
*
* @param array|string $input
* @param string $pattern
* @return array
*/
function search($input, $pattern) {
if (is_string($input))
$input = json_decode($input);
$clean = [];
foreach($input as $item) {
if($item->lastName == $pattern) {
$clean[] = $item;
}
}
if(count($clean) > 1)
foreach($clean as $key => $value) {
$cmpDate[$key] = date($value->birth);
}
$clean[] = array_multisort($cmpDate, SORT_ASC, $clean);
return array_values($clean)[0];
}
var_dump(search($json, 'Doe'));
SELECT cat.cat_url, cat.cat_name, prod.name
FROM categories cat
LEFT JOIN products prod
ON prod.cat_id = cat.id