'full_info_cache_time' => 3600, // Full peer info cache validity. 'full_fetch' => false, // Should madeline fetch the full member list of every group it meets?
On this page you can find all versions of the php package znmin/laravel-madeline-proto. It is possible to download/install these versions without Composer.
Hi, I’m trying to build a notification system where the admin can send messages to a private channel. I’ve managed to test it with the library Madelineproto.
class to Laravel Service ContainerOr use ready wrapperhttps://github.com/setiawanhu/laravel-madeline-proto
5 Temmuz 2021
5 kişi değerlendirdi
0 yorum
{"2_kuta":{"state":{"logo":{"href":"//yandex.com.tr","isForeign":true},"form":{"action":"/search","searchLabel":"Bul","hiddenInputs":[{"name":"lr","value":20815}]},"actions":{"advancedSearch":{"checked":false,"ariaLabel":"Gelişmiş arama"},"moreButtonProps":{"ariaLabel":"Daha fazla"},"cbir":{"name":"cbir","label":"Поиск по картинке","infoUrl":"//yandex.ru/promo/photosearch/index?source=landingdesk","isMacOS":false}},"userSection":{"loggedIn":false,"loginProps":{"loginUrl":"https://passport.yandex.com.tr/auth?retpath=%2F&origin=serp_desktop_auth_new","loginText":"Giriş yap","burgerAriaLabel":"Menü"}},"navigation":{"tabs":[{"id":"www","label":"Arama","url":"//yandex.com.tr","params":{"source":"tabbar"},"target":""},{"id":"images","label":"Görsel","url":"//yandex.com.tr/gorsel/search","params":{"text":"[$query]","noreask":"[$noreask]","nomisspell":"[$nomisspell]","parent-reqid":"[$reqid]","from":"tabbar"}},{"id":"video","label":"Video","url":"//yandex.com.tr/video/search","params":{"text":"[$query]","noreask":"[$noreask]","parent-reqid":"[$reqid]","from":"tabbar"}},{"id":"maps","label":"Haritalar","url":"//yandex.com.tr/harita","params":{"text":"[$query]","source":"serp_navig"}},{"id":"translate","label":"Çeviri","url":"//ceviri.yandex.com.tr","params":{"text":"[$query]","from":"tabbar"}}],"selectedTabId":"www"},"context":{"query":"madeline proto","reqid":"1721450620882063-12593635483259716140-balancer-l7leveler-kubr-yp-vla-50-BAL","noreask":"1","lr":"20815","counters":{"type":"b","data":{"$header":"0_dez4z000","logo":"0_dez4z001","login":"0_dez4z003","usermenu":"0_dez4z004","market-cart":"0_dez4z006","more-button":"0_dez4z007","cbir":"0_dez4z008","$navigation":"0_dez4z009","item":"0_dez4z00i","tab-www":"0_dez4z00b","tab-images":"0_dez4z00d","tab-video":"0_dez4z00f","tab-maps":"0_dez4z00h","tab-translate":"0_dez4z00j"}}},"loggedIn":false,"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"0_dez4w01-0-1"},"ui":"desktop","service":"web","reqid":"1721450620882063-12593635483259716140-balancer-l7leveler-kubr-yp-vla-50-BAL","fast":{"name":"header-desktop"}}}}},"type":"header-desktop"},"2_dez40":{"state":{"thumbWidth":198,"thumbHeight":113,"videoPreviewHref":"http://www.youtube.com/watch?v=t9nIzmRk4KA","internalLinksTarget":"_blank","posterSrc":"//avatars.mds.yandex.net/get-vthumb/470393/90e989c0b0fb4cdab9f74c332ea32355/564x318","videoSrc":"https://video-preview.s3.yandex.net/qJkhswAAAAA.mp4","videoType":"video/mp4","duration":"5:19","isAdultContent":false,"isVertical":false,"logNode":{"name":"video","attrs":{"externalId":{"entity":"video","id":"12580611128114698399"},"hasVideoViewerLink":false,"hasFilmId":true}},"organicVideoMeta":{"created":"9 May 2019","views":"5 bin görüntüleme"},"i18nTexts":{"durationAriaLabel":"Süre","freshAriaLabel":"Yayınlandı"},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_dez4w0c-0-1"},"ui":"desktop","service":"web","reqid":"1721450620882063-12593635483259716140-balancer-l7leveler-kubr-yp-vla-50-BAL","organic":1}}}},"type":"organic"},"2_dez41":{"state":{"answersUrl":"https://stackoverflow.com/questions/65713179/telegram-madelineproto-in-laravel#answers","type":"fact","tabsOptions":[{"id":"question","text":"Soru"},{"id":"bestAnswer","text":"En iyi yanıt"},{"id":"moreAnswers","text":"2 yanıt daha","shortText":"Daha fazla"}],"tabContents":{"question":{"construct":[{"type":"paragraph","content":[{"type":"text","content":"I need to add the "},{"type":"text","content":"Telegram madelineproto library"},{"type":"text","content":" to my Laravel project. How can I do it via composer and How can I call it in my controllers"}]}],"footerProps":{"date":1610585377,"numLiked":1,"numCommented":0}},"bestAnswer":{"construct":[{"type":"code","content":[{"type":"text","content":[{"type":"text","content":"composer require danog/madelineproto"}]}]},{"type":"paragraph","content":[{"type":"text","content":"https://docs.madelineproto.xyz/docs/INSTALLATION.html#composer-from-existing-project"}]},{"type":"paragraph","content":[{"type":"text","content":"Register "},{"type":"code","content":[{"type":"text","content":"\\danog\\MadelineProto\\API"}],"isInline":true},{"type":"text","content":" class to "},{"type":"text","content":"Laravel Service Container"}]},{"type":"paragraph","content":[{"type":"text","content":"Or use ready wrapper"}]},{"type":"paragraph","content":[{"type":"text","content":"https://github.com/setiawanhu/laravel-madeline-proto"}]}],"footerProps":{"date":1625509520,"numLiked":5,"numCommented":0}},"moreAnswers":[{"construct":[{"type":"paragraph","content":[{"type":"text","content":"You can't add it via composer.\n"},{"type":"text","content":"https://packagist.org/packages/danog/madelineproto"},{"type":"text","content":"\nIt's not a package. It's whole project."}]},{"type":"paragraph","content":[{"type":"text","content":"If you look at "},{"type":"text","content":"https://github.com/danog/MadelineProto/blob/master/composer.json"},{"type":"text","content":"\nYou will see it's not a package."}]},{"type":"code","content":[{"type":"text","content":[{"type":"text","content":"{"}]},{"type":"text","content":[{"type":"text","content":" \"name\": \"danog/madelineproto\","}]},{"type":"text","content":[{"type":"text","content":" \"description\": \"PHP implementation of telegram's MTProto protocol.\","}]},{"type":"text","content":[{"type":"text","content":" \"type\": \"project\","}]},{"type":"text","content":[{"type":"text","content":"}"}]}]}],"footerProps":{"date":1610587230,"numLiked":0,"numCommented":0}},{"construct":[{"type":"paragraph","content":[{"type":"text","content":"for faster code, use these steps:"}]},{"type":"paragraph","content":[{"type":"text","content":"Step 1:"}]},{"type":"paragraph","content":[{"type":"text","content":"download"},{"type":"text","content":" the "},{"type":"code","content":[{"type":"text","content":"danog/MadelineProto"}],"isInline":true},{"type":"text","content":" as a zip file, export the content of the zip file on a folder named 'lib/MadelineProto-master',"}]},{"type":"paragraph","content":[{"type":"text","content":"Step 2:"}]},{"type":"paragraph","content":[{"type":"text","content":"use terminal to compose the "},{"type":"code","content":[{"type":"text","content":"MadelineProto"}],"isInline":true},{"type":"text","content":" venders"}]},{"type":"code","content":[{"type":"text","content":[{"type":"text","content":"cd lib/MadelineProto-master"}]},{"type":"text","content":[{"type":"text","content":"composer install --ignore-platform-reqs"}]}]},{"type":"paragraph","content":[{"type":"code","content":[{"type":"text","content":"--ignore-platform-reqs"}],"isInline":true},{"type":"text","content":" is needed to ignore the PHP version and so on.\nthe composer will download all the vender on "},{"type":"code","content":[{"type":"text","content":"lib/MadelineProto-master/vendor"}],"isInline":true}]},{"type":"paragraph","content":[{"type":"text","content":"Step 3:"}]},{"type":"paragraph","content":[{"type":"text","content":"on your controller call the project lib like this:"}]},{"type":"code","content":[{"type":"text","content":[{"type":"text","content":"require_once '../lib/MadelineProto-master/vendor/autoload.php';"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":"//*/"}]},{"type":"text","content":[{"type":"text","content":"class TelegramController extends Controller"}]},{"type":"text","content":[{"type":"text","content":"{"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" private function sendMessage()"}]},{"type":"text","content":[{"type":"text","content":" {"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" $settings['app_info']['api_id'] = '##';"}]},{"type":"text","content":[{"type":"text","content":" $settings['app_info']['api_hash'] = '####';"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" $MadelineProto = new \\danog\\MadelineProto\\API('session.madeline', $settings);"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" $MadelineProto->start();"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" $me = $MadelineProto->getSelf();"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" if (!$me['bot']) {"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" $sendMessage = $MadelineProto->messages->sendMessage(["}]},{"type":"text","content":[{"type":"text","content":" 'peer' => '@mansourcodes',"}]},{"type":"text","content":[{"type":"text","content":" 'message' => \"Hi! \u003c3\""}]},{"type":"text","content":[{"type":"text","content":" ]);"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" }"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":" }"}]},{"type":"text","content":[{"type":"text","content":"}"}]}]},{"type":"paragraph","content":[{"type":"text","content":"Slow Solution:"}]},{"type":"paragraph","content":[{"type":"text","content":"this solution will take 3-4s per call:"}]},{"type":"code","content":[{"type":"text","content":[{"type":"text","content":"if (!file_exists('madeline/madeline.php')) {"}]},{"type":"text","content":[{"type":"text","content":" copy('https://phar.madelineproto.xyz/madeline.php', 'madeline/madeline.php');"}]},{"type":"text","content":[{"type":"text","content":"}"}]},{"type":"text","content":[{"type":"text","content":"require_once 'madeline/madeline.php';"}]},{"type":"text","content":[{"type":"text","content":""}]},{"type":"text","content":[{"type":"text","content":"class TelegramController extends Controller"}]},{"type":"text","content":[{"type":"text","content":"{"}]},{"type":"text","content":[{"type":"text","content":"// ...."}]}]}],"footerProps":{"date":1621437818,"numLiked":-1,"numCommented":1}}]},"organic":{"faviconProps":{"src":"https://favicon.yandex.net/favicon/v2/https://stackoverflow.com","size":"m","pageNumber":0,"index":0},"title":"Telegram madelineproto in Laravel","pathProps":{"items":[{"url":"https://stackoverflow.com/questions/65713179/telegram-madelineproto-in-laravel","text":"stackoverflow.com"},{"url":"https://stackoverflow.com/questions/65713179/telegram-madelineproto-in-laravel","text":"telegram-madelineproto-in-laravel"}]},"faviconPosition":0,"subtitlePosition":1,"linkProps":{"url":"https://stackoverflow.com/questions/65713179/telegram-madelineproto-in-laravel"},"hostTitle":"stackoverflow.com","description":""},"extralinksProps":{"hidden":true,"directions":["bottom-end"],"items":[{"variant":"reportFeedback","reportFeedback":{"feature":"Блок ответов для разработчиков","title":"Bu yanıtta yanlış olan nedir?","checkBoxLabels":[{"value":"Yanıt sorguya uygun değil"},{"value":"Yanıt hatalı"},{"value":"Yanıttaki bilgiler eksik"},{"value":"Diğer"}]}}]},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_dez4w0f-0-1"},"ui":"desktop","service":"web","reqid":"1721450620882063-12593635483259716140-balancer-l7leveler-kubr-yp-vla-50-BAL","fast":{"name":"article"}}}}},"type":"article"},"2_dez42":{"state":{"linksGroups":[{"type":"geo","links":[{"label":"Columbus","title":"Columbus","url":"//yandex.com.tr/tune/geo","logNode":{"name":"region"},"target":"_self","a11yLabel":"Bölgeniz Columbus","needRetpath":true}]},{"type":"feedback","links":[{"label":"Hata bildir","logNode":{"name":"feedback","attrs":{"behaviour":{"type":"dynamic"}}}}]},{"type":"settings","links":[{"label":"Ayarlar","url":"//yandex.com.tr/tune/search","logNode":{"name":"settings"},"target":"_self","needRetpath":true}]},{"type":"company","links":[{"label":"Hakkımızda","url":"https://company.yandex.com.tr","logNode":{"name":"about"},"target":"_blank"},{"label":"Ticari teklifler","url":"/search/direct?text=madeline%20proto&filters_docs=direct_cm","logNode":{"name":"commercial"},"target":"_blank"},{"label":"Kariyer","url":"//yandex.com.tr/jobs/?utm_source=serp_turkie&utm_medium=footerlink&utm_content=career","logNode":{"name":"vacancy"},"target":"_blank"},{"label":"Kullanım lisansı","url":"//yandex.com.tr/legal/termsofuse/","logNode":{"name":"license"},"target":"_blank"},{"label":"Gizlilik Politikası","url":"//yandex.com.tr/legal/confidential/","logNode":{"name":"confidential"},"target":"_blank"}],"a11yHidden":true}],"reportFeedbackProps":{"feature":"Подвал","title":"Hata bildir","checkBoxLabels":[]},"isSearchApp":false,"hasExtralinks":true,"limitingSelector":".AliceFabButton","baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_dez4w0g-0-1"},"ui":"desktop","service":"web","reqid":"1721450620882063-12593635483259716140-balancer-l7leveler-kubr-yp-vla-50-BAL"}}}},"type":"serp-footer"},"2_dez43":{"state":{"conditionLoadList":{"marketCart":false,"highchartsHighstock":false,"advProductGallery":false,"musicPlayer":false,"ecomRates":false,"photoViewer":false,"easterEggModal":false,"darkmodeChangeDrawer":true},"reportFeedbackBaseProps":{"initEmail":"","metaFields":{"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","userTestids":"186144,151171,1046868,13963,287509,338390,790823,962978,1061659,1068616","yandexuid":"7597161401721450620","uid":"0","queryText":"madeline proto","reqid":"1721450620882063-12593635483259716140-balancer-l7leveler-kubr-yp-vla-50-BAL","searchSlices":["drawer_search_slice_english"],"userRegionName":"Columbus","userRegionId":"20815"}},"extralinksPopupProps":{"abuseLink":"https://twitter.yandex.com.tr/search/abuse?sign=bcfff0882e8a9f00bac12daeb9f7297f&keyno=0"},"isLoggedIn":false,"userMenuDialogProps":{"flag":"skin,feedback","host":"yandex.com.tr","lang":"tr","project":"serp","queryParams":{"utm_source":"search"},"retpath":"https%3A%2F%2Ftwitter.yandex.com.tr%2Fsearch%3Flr%3D20815%26noreask%3D1%26rq%3D1%26serp-reload-from%3Drec_bottom%26source%3Dtabbar%26text%3Dmadeline%2Bproto%26ncrnd%3D15255","tld":"com.tr"},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_dez4w0h-0-1"},"ui":"desktop","service":"web","reqid":"1721450620882063-12593635483259716140-balancer-l7leveler-kubr-yp-vla-50-BAL","fast":{"name":"lazy-load"}}}}},"type":"lazy-load"}}