PHP code example of dan / laravel-more

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

    

dan / laravel-more example snippets


$order->update($transaction->unmorph('charge'));

// is the same as

$order->update(['charge_id' => $transaction->getKey(), 'charge_type' => get_class($transaction)]);