HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers87/basephotography.nl/app/controllers/BaseController.php
<?php

use Illuminate\Routing\Controller;

class BaseController extends Controller
{

	public function emailAdministrator($exception, $code)
	{
	    return false;
	    
		//Check if we exclude the email for the current url
		if($this->checkExcludedErrors($code)) return false;

		$mailer = \App::make('Komma\Mailers\Mailer');

		$mailer->sendTo(\Config::get('business.admin_emails'), 'Fout Code ' . $code, 'emails/error',
				[
						'code' => $code,
						'stack' => $exception->__toString(),
						'path' => \Request::path()
				]);

	}

	public function abortPage($type = 404)
	{
		$view = \View::make($type)->render();
		return \Response::make($view, $type);

	}

	public function checkExcludedErrors($code){

        if($code == 500)
        {
            if(\Request::segment(1) == 'kms' && \Request::segment(2) == 'projects') return true;
            return false;
        }

        if($code == 404) return true;

        //check if last segments starts with tel
        $segments = Request::segments();
        if(substr(end($segments), 0, 4)=== 'tel:') return true;

        switch(\Request::segment(1)){
            case 'kms':
            case 'apple-touch-icon.png':
            case 'wp-login.php':
            case 'wp-admin':
            case 'blog/wp-login.php':
            case 'wp':
            case 'wordpress':
            case 'administrator':
            case 'www.googletagmanager.com/ns.html':
            case 'autodiscover':
            case 'browserconfig.xml':
                return true;

            default:
                return false;
        }
	}

}