11 months ago

View()->share() vs compact()

Posted 11 months ago by dan3460

@snapey had a comment on a discussion about a blade returning 1. He said that uses the share method to pass data to the view. I have been using the compact() function when i'm passing data to the view (for example a drop down). Are there significant differences between the two methods?

BTW this is the post: https://laracasts.com/discuss/channels/laravel/blade-echoing-returning-1

Please sign in or create an account to participate in this conversation.