Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.x Standardization creation of Helpers outside of those supplied by the … #101

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions BaseHelpers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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