src/SnooPHP/Http/Response.php
public static function resource($file, $type = null, $evaluatePhp = false)
	{
		if ($path = path("resources/$file", true))
		{
			ob_start();
			$evaluatePhp ? include($path) : readfile($path);
			$content = ob_get_contents();
			ob_end_clean();

			return new static($content, 200, ["Content-Type" => $type ?: mime_type($path)]);
		}

		static::abort(404, [
			"status"		=> "ERROR",
			"description"	=> "resource not found"
		]);
	}
public static function resource($file, $type = null, $evaluatePhp = false)
	{
		if ($path = path("resources/$file", true))
		{
			ob_start();
			$evaluatePhp ? include($path) : readfile($path);
			$content = ob_get_contents();
			ob_end_clean();

			return new static($content, 200, ["Content-Type" => $type ?: mime_type($path)]);
		}

		static::abort(404, [
			"status"		=> "ERROR",
			"description"	=> "resource not found"
		]);
	}
Return a resource (file)

Resource are stored in the `storage` directory

@param string		$file			path to the resource, relativo to the storage directory
@param string|null	$type			MIME type of the resource (default: null)
@param bool			$evaluatePhp	if true php code in the resource will be evaluated before outputting the content (default: false)

@return Response