Skip to content

Commit

Permalink
Standardization creation of Helpers outside of those supplied by the …
Browse files Browse the repository at this point in the history
…framework.
  • Loading branch information
Grupo Altum authored and Grupo Altum committed Jun 26, 2023
1 parent f2c640f commit 0ea674a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions BaseHelpers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Illuminate\Support;

abstract class BaseHelpers
{
/**
* Handle calls to missing methods on the helper.
*
* @param string $method
* @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException
*/
public function __call($method, $parameters)
{
throw new BadMethodCallException(sprintf(
'Method %s::%s does not exist.', static::class, $method
));
}

/**
* @return New Instance Class.
*/
public static function instance() {
return new static();
}

}

?>
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"illuminate/contracts": "^10.0",
"illuminate/macroable": "^10.0",
"nesbot/carbon": "^2.62.1",
"voku/portable-ascii": "^2.0"
"voku/portable-ascii": "^2.0",
"rmunate/laravel_helpers": "^1.2"
},
"conflict": {
"tightenco/collect": "<5.5.33"
Expand Down

0 comments on commit 0ea674a

Please sign in to comment.