return Task::query()
->where('user_id', Auth::id())
->orderBy('when')
->pluck('when')
->map(fn(string $date): string => \Carbon\Carbon::parse($date)->format('d/m/Y H:i:s'));
new Rabbit("Белый кролик")
Rabbit extends Animal
class Animal {
constructor(name) {
this.name = name;
}
}
чтобы данные из devtool сразу вносились бы в файл.scss
function prepare(){
const results = [];
for(let i = 0; i <= sections.length-1; i++){
const result = createFile(`src/parts/_${sections[i]}.html`, `
<div class="${sections[i]}">
<div class="${sections[i]}__content ${sections[i]}__container"></div>
</div>\n`,
function (err) {
// file either already exists or is now created (including non existing directories)
});
results.push(result); // Если функция выше ушла в ошибку, нужно это обработать отдельно
}
return results;
}
function calls(func, ms) {
let call = true;
return function (x) {
if (call) {
call = false;
setTimeout(() => { call = true }, ms);
return func.apply(this, arguments);
}
}
}
js не воспринимает before как часть класса toggleНе совсем так - как часть toggle псевдоэлемент как раз воспринимается, но в функции скрытия вы проверяете на то, что элемент является ребёнком toggle и вот для псведоэлементов это не так. Собственно, у js нет доступа к псевдоэлементам и их он воспринимает как сам основной элемент.
if (!$(e.target).parents().hasClass("toggle") && !$(e.target).hasClass("toggle") && $(e.target).parents(".nav-items").length === 0)
+
.const miliseconds_day = 1000 * 60 * 60 * 24;
const lastDate = new Date();
const nextDate = new Date(lastDate.valueOf() + miliseconds_day);
console.log(lastDate.valueOf() + miliseconds_day, 'ms');
console.log(lastDate, 'last');
console.log(nextDate, 'next');
const miliseconds_day = 1000 * 60 * 60 * 24;
const nextDate = new Date(Date.now() + miliseconds_day);
console.log(nextDate, 'next');
<?php
$a = 0.5;
$b = "0.5";
$c = $a . $b;
echo $c; // "0.50.5"
if (
window.location.search.indexOf('?q=') === -1 &&
window.location.search.indexOf('&q=') === -1
) {
window.location.search += (window.location.search ? '&' : '?' ) + 'q=' + searchInput.value;
}