mass6 / laravel-die-dump-array
Helper function to die and dump Laravel collection to their array representation
Requires
- php: ^7.4|^8.0
- symfony/var-dumper: *
README
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.
Installation
You can install the package via composer:
composer require mass6/laravel-die-dump-array
Usage
$user = User::find(1); dda($user); // Example output: [ 'name' => 'Luca Brasi', 'email' => 'luca.b@corleone.it' ]
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email samcharmy@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
PHP Package Boilerplate
This package was generated using the PHP Package Boilerplate by Beyond Code.