/** * Returns a file in the assets directory * * @return \Illuminate\Support\Facades\Response */ public function file($path) { $absolutePath = Asset::isJavascript($path); if ($absolutePath) { return $this->javascript($absolutePath); } $absolutePath = Asset::isStylesheet($path); if ($absolutePath) { return $this->stylesheet($absolutePath); } $absolutePath = Asset::isFile($path); if ($absolutePath) { return new BinaryFileResponse($absolutePath, 200); } App::abort(404); }