Prevent a HiddenFiles class from being instantiated without using fromConfig()

This commit is contained in:
Chris Kankiewicz
2020-11-03 11:34:37 -07:00
parent 073b11d24c
commit c873abc204

View File

@@ -2,10 +2,23 @@
namespace App;
use BadMethodCallException;
use Tightenco\Collect\Support\Collection;
class HiddenFiles extends Collection
{
/** {@inheritdoc} */
protected function __construct(...$args)
{
parent::__construct(...$args);
}
/** {@inheritdoc} */
public static function make($items = [])
{
throw new BadMethodCallException('Method not implemented');
}
/** Create a new HiddenFiles collection object. */
public static function fromConfig(Config $config): self
{