Helper function to die and dump Laravel collection to their array representation. When you want to dump an Eloquent
model, and only want the model's attributes, the dda
function will call the toArray()
method on the model,
then die and dump. Works with any class that implements the toArray
method.
You can install the package via composer:
composer require mass6/laravel-die-dump-array
$user = User::find(1);
dda($user);
// Example output:
[
'name' => 'Luca Brasi',
'email' => '[email protected]'
]
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the PHP Package Boilerplate by Beyond Code.