Domain: amberpublishers.in
Server Adress: 86.38.243.169

privdayz.com

/home/u866425823/domains/newscafeindia.com/app/Providers/
Dosya Yükle :
Current File : //home/u866425823/domains/newscafeindia.com/app/Providers/ViewComposerServiceProvider.php

<?php

namespace App\Providers;

use App\Models\Category;
use Illuminate\Support\ServiceProvider;

class ViewComposerServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap services.
     */
    public function boot(): void
    {
        view()->composer('*', function ($view) {
            $categories = Category::select('name', 'categoryslug')->get();
            $view->with('categories', $categories);
        });
    }
}

coded by Privdayz.com - Visit https://privdayz.com/ for more php shells.