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/SBogers96/smilefotografie.nl/app/controllers/BaseController.php
<?php

use Illuminate\Routing\Controller;

class BaseController extends Controller
{

	public function emailAdministrator($exception, $code)
	{
		//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) return false;
		if(\Request::segment(1) == 'kms') return true;
		if(\Request::segment(1) == 'autodiscover') return true;
		if(\Request::segment(1) == 'browserconfig.xml') return true;

		return false;
	}

}