public function bootstrap(Application $app) { $fs = new Filesystem(); if ($fs->exists($app->getCachedServicesPath())) { $fs->remove($app->getCachedServicesPath()); } if ($fs->exists($app->getCachedCompilePath())) { $fs->remove($app->getCachedCompilePath()); } }
public function render($str, array $vars = []) { $__tmp_stub_file = Str::random() . uniqid(time(), false); !$this->fs->exists($this->cachePath) && $this->fs->makeDirectory($this->cachePath, 0755, true); $__tmp_stub_path = Path::join($this->cachePath, $__tmp_stub_file); $this->fs->put($__tmp_stub_path, $this->compiler->compileString($str)); $__env = $this->getViewFactory(); if (is_array($vars) && 0 !== count($vars)) { extract($vars); } ob_start(); include $__tmp_stub_path; $var = ob_get_contents(); ob_end_clean(); $this->fs->delete($__tmp_stub_path); return $var; }
/** * Bootstrap the given application. * * @param \Illuminate\Contracts\Foundation\Application $app * * @return void */ public function bootstrap(Application $app) { $path = config('database.connections.sqlite.database'); $fs = new Filesystem(); if (!$fs->exists($path)) { $fs->touch($path); } }
protected function ensureDirectory($path) { if (!$this->fs->exists($path)) { $this->fs->makeDirectory($path, 0755, true); } }