VaKeR CYBER ARMY
Logo of a company Server : Apache
System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : vapecompany ( 2719)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/home/vapecompany/demo.vapecompany.com.bd/app/Providers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/home/vapecompany/demo.vapecompany.com.bd/app/Providers/RouteServiceProvider.php
<?php

namespace App\Providers;

use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\Route;
use View;
use App\Models\Notification;
use App\Models\CompanyInfo;
use App\Models\Category;

class RouteServiceProvider extends ServiceProvider
{
    /**
     * The path to the "home" route for your application.
     *
     * This is used by Laravel authentication to redirect users after login.
     *
     * @var string
     */
    public const HOME = '/dashboard';
    public const DASHBOARD = '/admin/dashboard';

    /**
     * The controller namespace for the application.
     *
     * When present, controller route declarations will automatically be prefixed with this namespace.
     *
     * @var string|null
     */
    // protected $namespace = 'App\\Http\\Controllers';

    /**
     * Define your route model bindings, pattern filters, etc.
     *
     * @return void
     */
    public function boot()
    {
        $not=Notification::Where('r_status',0)->orderBy('notefication_date', 'desc')->get();
        $companyInfo = CompanyInfo::first();
        $menus = Category::where('parent_id',0)->get();
        //dd($not);
     
        $custom_table_header_text='<div style="text-align:center"><h2 class="name">'.($companyInfo ? $companyInfo->company_name: 'Maktel Ltd').'</h2><div>'.($companyInfo ? $companyInfo->company_address : 'House-277(Level-4),Lane-4,Baridhara DOHS,Dhaka-1206.').'</div><div>Hotline:+'.($companyInfo ? $companyInfo->company_phone: '88 01844241530').'</div><div>Email:'.($companyInfo ? $companyInfo->company_email : 'info@maktel.com.bd').'</div><div>Web:'.($companyInfo ? $companyInfo->company_website : 'www.maktel.com.bd').'</div></div>';
        View::share('custom_notification', $not);
        View::share('companyInfo', $companyInfo);
        View::share('menus', $menus);
        $this->configureRateLimiting();

        $this->routes(function () {
            Route::prefix('api')
                ->middleware('api')
                ->namespace($this->namespace)
                ->group(base_path('routes/api.php'));

            Route::middleware('web')
                ->namespace($this->namespace)
                ->group(base_path('routes/web.php'));
        });
    }

    /**
     * Configure the rate limiters for the application.
     *
     * @return void
     */
    protected function configureRateLimiting()
    {
        RateLimiter::for('api', function (Request $request) {
            return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
        });
    }
}

VaKeR 2022