Skip to content

Installation

Get Barta up and running in your Laravel application in just a few minutes.

  • PHP 8.2 or higher
  • Laravel 11.x or 12.x
  • Composer for package management
Terminal window
composer require larament/barta
Terminal window
php artisan barta:install

This publishes the config/barta.php configuration file.

Add your SMS gateway credentials to .env:

BARTA_DRIVER=ssl
BARTA_SSL_TOKEN=your-api-token
BARTA_SSL_SENDER_ID=your-sender-id
use Larament\Barta\Facades\Barta;
// Use 'log' driver to test without sending real SMS
Barta::driver('log')
->to('01712345678')
->message('Hello from Barta!')
->send();

Check storage/logs/laravel.log to verify the message was logged.