Nutgram – the Telegram bot framework

<?php

use SergiX44\Nutgram\Nutgram;

$bot = new Nutgram($_ENV['TOKEN']);

$bot->onCommand('start', fn(Nutgram $bot) => $bot->sendMessage('Ciao!'));

$bot->onText('My name is {name}', fn(Nutgram $bot, $name) => $bot->sendMessage("Hi {$name}"));

$bot->run();

This framework takes advantage of the latest PHP 8 features, and tries to make the speedscalability and flexibility of use its strength, it will allow you to quickly make simple bots, but at the same time, it provides more advanced features to handle even the most complicated flows. Some architectural concepts on which Nutgram is based are heavily influenced by other open source projects such as Botman and Zanzara, check them out too!

https://github.com/SergiX44/Nutgram

NovaGram – php api для телеграм бота

Поддерживает все команды Bot Api 5.0

use skrtdev\NovaGram\Bot;
use skrtdev\Telegram\Message;

$Bot = new Bot("YOUR_TOKEN");

$Bot->onCommand("start", function (Message $message) use ($Bot) {
    $message->reply("Hey! Nice to meet you. Use /info to know more about me.");
});

$Bot->onCommand("info", function (Message $message) use ($Bot) {
    $message->reply("Well, I'm just an example, but you can learn more about NovaGram at docs.novagram.ga");
});

https://github.com/skrtdev/NovaGram

tioffs / InstaLite – простое php api для инстаграмма

require_once __DIR__ . '/vendor/autoload.php';
use InstaLite\InstaLite;
$instagram = new InstaLite("username", "password", "proxy");
/** search user (return array standart instagram) **/
$user = $instagram->searchUser('alex')->id();
/** search user (return array user id [1,2,3]) **/
$user = $instagram->searchUser('alex')->all();
/** send photo **/
$instagram->uploadPhoto(__DIR__ . '/img.jpg', 'text #hashtag');
/** send message direct **/
$instagram->sendMessage('text message', [1233, 1233, 1223]);

https://github.com/tioffs/InstaLite

laravel / airlock – легковесная система аутентификации для SPA и простых API

use App\\User;
use Illuminate\\Http\\Request;
use Illuminate\\Support\\Facades\\Hash;
use Illuminate\\Validation\\ValidationException;

Route::post('/airlock/token', function (Request $request) {
    $request->validate([
        'email' => 'required|email',
        'password' => 'required',
        'device_name' => 'required'
    ]);

    $user = User::where('email', $request->email)->first();

    if (! $user || ! Hash::check($request->password, $user->password)) {
        throw ValidationException::withMessages([
            'email' => ['The provided credentials are incorrect.'],
        ]);
    }

    return $user->createToken($request->device_name)->plainTextToken;
});

https://github.com/laravel/airlock