public function testCreateImgTest()
{
$this->actingAs($someExistingUser);
$this->get('/create')->assertOk();
}
//Обновление статуса
public function statusUpdate($status)
{
$this->update(['status_id'=>$this->{$status}()]);
}
$product->statusUpdate('active');
class Foo
{
public const ACTIVE = 1;
public const INACTIVE = 2;
public function isActive()
{
return $this->status_id === static::ACTIVE;
}
public function statusUpdate($status)
{
$this->update(['status_id' => $status]);
}
}
(new Foo)->statusUpdate(Foo::ACTIVE);
Должна же работать до первого случая.Не должна.
Как ето исправить?Убрать флаг глобального поиска, который вы зачем-то добавили: learn.javascript.ru/regexp-introduction#flagi
7. Месяц 1 > 02 - почему?Потому что в js месяцы считаются от ноля - единица в конструкторе обозначает февраль.
9. Час 10 > 07 - почему?Потому что часовой пояс UTC.
3. Месяц 1 > 01 - вопросов нет.Потому что 0 часов 0 минут первого февраля в вашем часовом поясе - это ещё 31-е января по UTC.
4. День 1 > 31 - почему?
Исходя из определений, при вызове функции (даже внутри метода объекта) ее this равен глобальному объекту, в данном случае window.
$objCity->country_id = 1;
$objCity->name = $city;
при переходе через активизирующий метод роутhttps://laravel.com/docs/5.7/seeding
fun('Прошло 5сек');
function fun(str) {
var timerLogout;
var handler = resetTimer.bind(null, str);
document.addEventListener('mousemove', handler);
resetTimer(str);
function resetTimer(str) {
clearTimeout(timerLogout);
timerLogout = setTimeout( function() {
RemoveEventListener(str);
}, 5000);
}
function RemoveEventListener(str) {
console.log('RemoveEventListener вызвана, удаляем прослушивание');
document.removeEventListener('mousemove', handler);
console.log(str);
}
}