Retrieving a message from a cryptocurrency daemon
I don't get the point where you cast null to object.

I'm not sure what are you trying to achive,
but you can always make if 'less ugly'.

$transcations_pool = json_decode($rpc-&gt;getTransactionPool(), false);   
$transactions_pool = isset($transactions_pool-&gt;transactions) ? 
                         $transaction_pool-&gt;transactions : 
                         (object) null;


Also i would move div .show-grid to separate file and load it like this:

@include('path/to/file', [ 'transaction_json' =&gt; json_decode($transaction-&gt;tx_json) ])


Or you can implement special method like $transaction-&gt;decodeTxJson() to handle this decoding in $transaction class.