src/Watchers/RequestWatcher.php
protected function extractDataFromView($view)
    {
        return collect($view->getData())->map(function ($value) {
            if ($value instanceof Model) {
                return FormatModel::given($value);
            } elseif (is_object($value)) {
                return [
                    'class' => get_class($value),
                    'properties' => json_decode(json_encode($value), true),
                ];
            } else {
                return json_decode(json_encode($value), true);
            }
        })->toArray();
    }
protected function extractDataFromView($view)
    {
        return collect($view->getData())->map(function ($value) {
            if ($value instanceof Model) {
                return FormatModel::given($value);
            } elseif (is_object($value)) {
                return [
                    'class' => get_class($value),
                    'properties' => json_decode(json_encode($value), true),
                ];
            } else {
                return json_decode(json_encode($value), true);
            }
        })->toArray();
    }
protected function extractDataFromView ( $ view ) { return collect ( $ view -> getData ( ) ) -> map ( function ( $ value ) { if ( $ value instanceof Model ) { return FormatModel :: given ( $ value ) ; } elseif ( is_object ( $ value ) ) { return [ 'class' => get_class ( $ value ) , 'properties' => json_decode ( json_encode ( $ value ) , true ) , ] ; } else { return json_decode ( json_encode ( $ value ) , true ) ; } } ) -> toArray ( ) ; }
Extract the data from the given view in array form.

@param  \Illuminate\View\View  $view
@return array
Extract the data from the given view in array form .