Download the PHP package otajonov/televel without Composer

On this page you can find all versions of the php package otajonov/televel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package televel

Televel Package for Laravel

Televel Package for Laravel

Introduction

Televel is a Laravel package designed to simplify the setup and management of Telegram bots within your Laravel application. It provides commands to set up, manage, and interact with Telegram bots via webhooks.

Installation

To install Televel, follow these steps:

  1. Install the package via Composer:

    composer require otajonov/televel

  2. Publish the package configuration and Provider files:

    php artisan vendor:publish --provider="Televel\TelevelServiceProvider" --tag="config"

This will publish the configuration file to config/televel.php, where you can configure your Telegram bots.

  1. Make sure your APP_URL in .env file is set correct, and is https.

  2. Run php artisan televel:setup and provide your Bot Token

  3. Congrats. Your Bot should be already running. /start it and happy coding!

Commands

Setup Command

The setup command (televel:setup) or (televel:setup botname) allows you to configure a new Telegram bot within your Laravel application. It prompts for the bot name and token and sets up the necessary webhook URL for Telegram updates.

Example usage:

php artisan televel:setup

List Command

The list command (televel:list) lists all configured Telegram bots along with their tokens and webhook URLs.

Example usage:

php artisan televel:list

Remove Command

The remove command (televel:remove) removes a configured Telegram bot from your Laravel application. It deletes the webhook, removes configuration entries, and deletes associated files.

Example usage:

php artisan televel:remove

Reset Command

The reset command (televel:reset) resets the webhook URL for a configured Telegram bot. It deletes the existing webhook, sets a new one with a new token, and updates the configuration.

Example usage:

php artisan televel:reset

Usage

Controller

Once set up, incoming updates from Telegram are handled by the webhook method in your newly generated YourBotController.php file in app/Http/Controllers folder.

Extending Televel class

You can further customize your Telegram bot by extending the Televel class and adding additional methods for handling specific bot functionalities.

<?php

namespace App\Http\Televels;

use Televel\Bot\Televel; // Import Televel if needed

class EchoBotTelevel extends Televel
{
    /**
     * Example method to send a message using the bot.
     *
     * @param int $chatId The chat ID where the message should be sent.
     * @param string $message The message to send.
     * @return object Response from Telegram API.
     */
    public function sendMessage($chatId, $message)
    {
        // Implement your custom logic here to send messages via Telegram API
        // Example: return $this->post('sendMessage', ['chat_id' => $chatId, 'text' => $message]);
    }
}

License

This package is open-source software licensed under the MIT license.

Feel free to contribute the project if you want


All versions of televel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.8
laravel/framework Version ^11.12
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package otajonov/televel contains the following files

Loading the files please wait ....