/** * Returns css for the given path * * @return \Illuminate\Support\Facades\Response */ private function stylesheet($path) { $this->prepareClientCache($path); $response = Response::make(Asset::stylesheet($path), 200); $response->header('Content-Type', 'text/css'); return $response; }
/** * Returns a file in the assets directory * * @return \Illuminate\Support\Facades\Response */ public function file($path) { $file = Asset::getFullPath($path); if (Asset::isJavascript($path)) { return $this->javascript($path); } if (Asset::isStylesheet($path)) { return $this->stylesheet($path); } if (file_exists($file)) { return Response::download($file); } App::abort(404); }