While BotMan itself is framework agnostic, BotMan is also available as a bundle with the great Laravel PHP framework. This bundled version is called BotMan Studio and makes your chatbot development experience even better. By providing testing tools, an out of the box web driver implementation and additional tools like an enhanced CLI with driver installation, class generation and configuration support, it speeds up the development significantly.
You can find the BotMan and BotMan Studio documentation at http://botman.io.
- Authorization
- Check own admissions
- Check doctors timesheets
- Notifications
- Rating and review
Run docker
docker-composer build
docker-compose up
Make commands
#run conversations tests
make botman-tests
#run unit tests
make unit
#build docker containers
make build
#start the server
make serve
#enter into php-fpm
make exec
#stop the server
make down
Other commands
#connecte to php
make exec
- Add clear db addon
heroku addons:add cleardb:ignite –a(my_app_name_goes_here)
After you can use CLEARDB_DATABASE_URL in envs, and you can connect remotely
CLEARDB_DATABASE_URL => mysql://[username]:[password]@[host]/[database name]?reconnect=true
- Run migrations
heroku run -a(my_app_name_goes_here) bash
#after
php artisan migrate
#than yes
- Set up scheduler
heroku addons:create scheduler:standard
#enter into sheduller
heroku addons:open scheduler
And set up command php artisan send_schedule
on 17.00 MSK
`
- Go to @BotFather in Telegram
- Press /newbot
- Enter bot data, for devs vetmanager-botman-$username
- Run server
make serve
- Start tunnelling with ngrok
ngrok http 8080
- php artisan botman:telegram:register --output and pass your url https://5e86b344.ngrok.io/botman
Where token is authtoken from @GodFather
- We are not using default params in constructor. It is wrong code
__construct($id = null)
We are using secondary constructors instead
class Student
{
public function __construct() {
// allocate your stuff
}
public static function withID( $id ) {
$instance = new self();
$instance->loadByID( $id );
return $instance;
}
public static function withRow( array $row ) {
$instance = new self();
$instance->fill( $row );
return $instance;
}
}
- We are not using
compact
. We are using plain arrays instead