dump-php-laravel

PHOTO EMBED

Thu Feb 02 2023 15:11:21 GMT+0000 (Coordinated Universal Time)

Saved by @dustbuster #php #laravel #command

// Display Object or Array
public function oa($model)
{
    if (gettype($model) === 'object') {
        dump(get_class($model));
        dump($model->toArray());
    } else {
        dump(gettype($model));
        dump($model);
    }
}
// Display string
public function s($model)
{
    dump($model);
}
content_copyCOPY

this is simple function for dumping out info for data.