PHP code example of sms77 / krayin

1. Go to this page and download the library: Download sms77/krayin 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/ */

    

sms77 / krayin example snippets



return [
    // ...
    'providers' => [
        // ...
        Seven\Krayin\Providers\SevenServiceProvider::class,
    ],
    // ...
];

return [
    // ...
    'seven' => [
        'api_key' => env('SEVEN_API_KEY'),
    ],
];

use Seven\Krayin\Services\SmsService;

$smsService = app(SmsService::class);

// Send SMS to a contact
$smsService->send(
    to: '+1234567890',
    message: 'Hello {{name}}, your appointment is confirmed!',
    contactId: $contact->id
);
bash
# Clear cache
php artisan cache:clear

# Run database migrations
php artisan migrate

# Regenerate autoload files
composer dump-autoload
bash
php artisan cache:clear && php artisan config:cache
bash
# Reset migrations if needed
php artisan migrate:rollback
php artisan migrate

# Clear all caches
php artisan cache:clear
php artisan config:clear
php artisan view:clear
bash
# Regenerate composer autoload
composer dump-autoload

# Clear bootstrap cache
php artisan optimize:clear
bash
# Run package tests
php artisan test packages/Seven/Krayin

# Run with coverage
php artisan test --coverage packages/Seven/Krayin