PHP code example of devnull-ir / laravel-free-host

1. Go to this page and download the library: Download devnull-ir/laravel-free-host library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

devnull-ir / laravel-free-host example snippets


$newObject = new \DevNullIr\LaravelFreeHost\LaravelFreeHost();

$newObject->uploadFile([
    "name" => "myimg.png",
    "chat_id" => $newObject->channel_id(),
    "document" => "https://cdn01.zoomit.ir/2022/8/galaxy-buds-2-pro-2.jpg?w=768"
]);

$newObject = new \DevNullIr\LaravelFreeHost\LaravelFreeHost();
$newObject->setDefault([
    "chat_id" => $newObject->channel_id()
]);
$newObject->uploadFile([
    "name" => "myimg.png",
    "document" => "https://cdn01.zoomit.ir/2022/8/galaxy-buds-2-pro-2.jpg?w=768"
]);

$newObject = new \DevNullIr\LaravelFreeHost\LaravelFreeHost();
$newObject->setDefault([
    "chat_id" => $newObject->channel_id()
]);
$newObject->uploadFile([
    "name" => "myimg.png",
    "chat_id" => 997471963,
    "document" => "https://cdn01.zoomit.ir/2022/8/galaxy-buds-2-pro-2.jpg?w=768"
]);
shell
php artisan migrate