system/libary/console.php
/**
     * Create Middleware
     *
     * @param string $middleware
     * @return string
     */
Create Middleware
@param string $middleware
@return string
Create Middleware @param string $middleware @return string
private function createMiddleware($middleware)
    {
        $namespace  = 'app\\Middlewares';
        $class      = $middleware;
        $location   = 'app/Middlewares/' . $middleware . '.php';
        if (file_exists($location)) {
            return $this->getColoredString('Middleware zaten mevcut:', 'red') . "\t" . $this->getColoredString($location);
        } else {
            $file       = fopen ($location, 'w');
            $content    = "<?php\nnamespace $namespace;\n\nclass $class\n{\n\n\tpublic static function handle()\n\t{\n\t\t\n\t}\n\n}";
            fwrite ($file, $content);
            fclose($file);
            return $this->getColoredString('Middleware basariyla olusturuldu: ', 'light_blue') . "\t" . $this->getColoredString($location);
        }
    }
private function createMiddleware ( $ middleware ) { $ namespace = 'app\\Middlewares' ; $ class = $ middleware ; $ location = 'app/Middlewares/' . $ middleware . '.php' ; if ( file_exists ( $ location ) ) { return $ this -> getColoredString ( 'Middleware zaten mevcut:' , 'red' ) . " \t " . $ this -> getColoredString ( $ location ) ; } else { $ file = fopen ( $ location , 'w' ) ; $ content = " <?php \n namespace  $ namespace ; \n \n class  $ class \n { \n \n \t public static function handle() \n \t { \n \t \t \n \t } \n \n } " ; fwrite ( $ file , $ content ) ; fclose ( $ file ) ; return $ this -> getColoredString ( 'Middleware basariyla olusturuldu: ' , 'light_blue' ) . " \t " . $ this -> getColoredString ( $ location ) ; } }
Create Middleware
 @param string $middleware
 @return string
Create Middleware @param string $middleware @return string