Skip to content

Commit

Permalink
Merge pull request #23 from SauravKumal/master
Browse files Browse the repository at this point in the history
Updated Docs
  • Loading branch information
grkamil authored Aug 23, 2021
2 parents 11cf02c + 6ba1974 commit d2a73a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Or you can simply change the default log channel in the .env
LOG_CHANNEL=telegram
```

Publish config file
Publish config file and views
```
php artisan vendor:publish --provider "Logger\TelegramLoggerServiceProvider"
```
Expand Down Expand Up @@ -71,6 +71,14 @@ For using this package you need to create Telegram bot
4. Get token and add it to your .env file (it is written above)
5. Go to your bot and send ``/start`` message

## Change log template at runtime

1. Change config for template.
```php
config(['telegram-logger.template'=>'laravel-telegram-logging::custom'])
```
2. Use `Log` as usual.

## Lumen support

To make it work with Lumen, you need also run two steps:
Expand Down
2 changes: 1 addition & 1 deletion src/TelegramLoggerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function register()
public function boot()
{
$this->loadViewsFrom(__DIR__.'/views', 'laravel-telegram-logging');
$this->publishes([__DIR__.'/views' => base_path('resources/views/vendor/laravel-telegram-logging')],'views' );
$this->publishes([__DIR__.'/views' => base_path('resources/views/vendor/laravel-telegram-logging')], 'views');
$this->publishes([__DIR__ . '/../config/telegram-logger.php' => config_path('telegram-logger.php')], 'config');
}
}

0 comments on commit d2a73a8

Please sign in to comment.