PHP code example of iletimerkezi / iletimerkezi-laravel

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

    

iletimerkezi / iletimerkezi-laravel example snippets



use IletiMerkezi\Facades\IletiMerkezi;

// Tek bir numaraya SMS gönderimi
IletiMerkezi::sms()->send('505xxxxxxx', 'Mesaj içeriği');

// Birden fazla numaraya SMS gönderimi
IletiMerkezi::sms()->send(['505xxxxxxx', '505xxxxxxx'], 'Mesaj içeriği');

    
    use Illuminate\Notifications\Notification;
    use IletiMerkezi\SMS\IletiMerkeziMessage;

    class OrderShipped extends Notification
    {
        public function via($notifiable)
        {
            return ['iletimerkezi'];
        }

        public function toIletiMerkezi($notifiable)
        {
            return IletiMerkeziMessage::create('Siparişiniz kargoya verilmiştir.')
                ->setIys(false, 'TACIR')
                // Opsiyonel: Gönderici adını belirler
                ->setSender('IletiMerkezi')
                // Opsiyonel: Gönderim zamanını belirler
                ->sendAt(now()->addMinutes(10)); 
        }
    }
    

    
    public function routeNotificationForIletiMerkezi()
    {
        return $this->phone_number; // Kullanıcının telefon numarası alanı
    }
    

    
    use App\Notifications\OrderShipped;

    $user->notify(new OrderShipped());
    
sh
    php artisan vendor:publish --tag=iletimerkezi-config
    
sh
    php artisan make:notification OrderShipped