Closed Juhlinus closed 5 years ago
I was playing around with this and this seems to work well.
ViewFactory::macro('component', function ($name, $data = []) { return View::make( 'app', [ 'name' => $name, 'data' => array_merge($data, [ 'user' => auth()->user() ]), ] ); });
<script> export default { props: ['podcasts', 'user'], mounted() { console.dir(this.$props) } } </script>
I was playing around with this and this seems to work well.