PHP code example of uitlaber / laravel-telegram-ray
1. Go to this page and download the library: Download uitlaber/laravel-telegram-ray 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/ */
uitlaber / laravel-telegram-ray example snippets
Route::get('/', function () {
ray('User visited the homepage.');
return view('welcome');
});
use App\Models\User;
$user = User::find(1);
ray($user->toArray());
try {
// Code that might throw an error
throw new \Exception('Something went wrong!');
} catch (\Exception $e) {
ray($e);
}