define('TESTING_SERVER_HOST', '127.0.0.1');
define('TEST_USER', 'testuser');
define('TEST_PASSWORD', 'applesauce');
function getMessage($id)
{
$server = new \Fetch\Server(TESTING_SERVER_HOST, 143);
$server->setAuthentication(TEST_USER, TEST_PASSWORD);
return new \Fetch\Message($id, $server);
}
//Ищем по Id
$message = getMessage(3);
//Помечаем как удаленное
$message->delete();
//Удаляем окончательно
$imapStream = $message->getImapBox()->getImapStream();
imap_expunge($imapStream);
function handleClickOnPhoto($photo){
$('.photo').removeClass('active-element');
$photo.addClass('active-element');
$('.point li').removeClass('active-point').
filter((index, item) => $photo.data('id') == $(item).data('id')).addClass('active-point');
$('.about-text p').text($photo.data('text'));
$('.about-site p').text($photo.data('info'));
$('.about-site a').text($photo.data('website')).attr("href", "#");
}
$('.photo').click(function(){
handleClickOnPhoto($(this));
});
$('.point li').click(function(){
$('.point li').removeClass('active-point');
$(this).addClass('active-point');
handleClickOnPhoto($(this));
});
php artisan migrate --path="/database/migrations"
<input type="file" name="images[]" multiple>
$images = [];
if ($request->hasFile('images')) {
foreach($request->file('images') as $key => $image){
$images[] = $image->store(uniqid(), 'public');
}
$news_body->image = json_encode($images);
}