Ejemplo n.º 1
0
 public static function configurePublicFilesRoutes()
 {
     \Route::get('packages/cmf/{file_path}', function ($filePath) {
         $filePath = __DIR__ . '/public/' . $filePath;
         if (File::exist($filePath)) {
             return response(File::contents(), 200, ['Content-Type' => File::load()->mime()]);
         } else {
             return response('File not found');
         }
     })->where(['file_path' => '(js|css|img)\\/.+\\.[a-z0-9]+$']);
 }
Ejemplo n.º 2
0
 protected function createScaffoldConfig($dataForViews)
 {
     $scaffoldConfigFile = $dataForViews['files']['scaffold_config'];
     if (File::exist($scaffoldConfigFile)) {
         File::remove();
     }
     File::save($scaffoldConfigFile, view($this->scaffoldConfigView, $dataForViews)->render(), 0664);
     $this->openFileInPhpStorm($scaffoldConfigFile);
     $this->line("ScaffoldConfig class created ({$scaffoldConfigFile})");
 }