Description
I have recently updated my code to put layouts in resources/views/layouts instead of resources/views/components/layouts. This means I have also updated all pages that use these components to use Blade's layout namespace.
Example
Rendering a layout in resources/views/layouts/app/sidebar.blade.php is done by <x-layouts::app.sidebar> ... </x-layouts::app.sidebar> compared to before <x-layouts.app.sidebar>...</x-layouts.app.sidebar>
The Problem
I have a View composer setup for my sidebar to populate the sidebar with data. Before the migration the composer was called in AppServiceProvider like so...
Facades\View::composer('components.layouts.app.sidebar', UserFriendsComposer::class);
so after the migration I upadted this code to...
Facades\View::composer('layouts.app.sidebar', UserFriendsComposer::class);
But now the variables are not getting passed to the layout through the composer and I am not sure what I am missing here.
Thanks