coderello / laravel-shared-data

📦 An easy way to share the data from your backend to the JavaScript.
https://coderello.com/docs/laravel-shared-data/1.0/sharing-data
MIT License
321 stars 22 forks source link

Delayed closures, interfaces implementation, tests refactoring #10

Closed hivokas closed 5 years ago

hivokas commented 5 years ago
share(function() {
    return ['user' => auth()->user()];
});

// or

share('user', function() {
    return auth()->user();
});
hivokas commented 5 years ago

Any thoughts before merge?