Esempio n. 1
0
 public function __construct()
 {
     /**
      *   |  ****************
      *   |  Girilen url herhangi bir röta ile eşleşmiyorsa tetiklenecek işlem callable veya string girilebilir
      *   |  ****************
      */
     App::miss(function (Request $request) {
         response(view('404'))->send();
     });
     /**
      *  İstisnaları dinlemeye alır
      */
     App::exception(function (Exception $exception) {
         $handle = new ExceptionHandler();
         $handle->handleException($exception);
     });
     /**
      * Hataları dinlemeye alır
      */
     App::error(function ($errno, $errstr, $errfile, $errline) {
         $handle = new ErrorHandler();
         $handle->handleError($errno, $errstr, $errfile, $errline);
     });
     /**
      * Exception ları log a atar
      */
     Listen::exception(function (Exception $exception) {
         new ExceptionLog($exception);
     });
     /**
      * Hataları log a atar
      */
     Listen::error(function ($errno, $errstr, $errfile, $errline) {
         new ErrorLog($errno, $errstr, $errfile, $errline);
     });
 }
Esempio n. 2
0
/**
 * Base Href adresini döndürür
 *
 * @return string
 */
function base()
{
    return \Anonym\App::base();
}