X

Create New Item

File Folder

X

Search Results

File "AppServiceProvider.php"

Full path: /home/orbitecv/orbite-school.orbit.et/app/Providers/AppServiceProvider.php
File size: 757 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Edit   Back

<?php

namespace App\Providers;

use App\Models\Instructor;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider;

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

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        view()->composer('*', function ($view) {

            $storageLink = true;
            // check if storage folder exists
            if (file_exists(public_path('storage'))) {
                $storageLink = false;
            }

            $view->with('storageLink', $storageLink);
        });

        Paginator::useBootstrapFive();
    }
}