Helper for rapid Laravel development improvements. This library is a function and class to help improve Laravel development.
Want to provide tangible support? Use the following platform to contribute to open-source software developers. Every contribution you make is a significant boost to continue building and enhancing technology that benefits everyone.
- Buy Me a Coffee https://s.id/hadibmac
- Patreon https://s.id/hadipatreon
- Saweria https://s.id/hadisaweria
We highly appreciate you sending us a few cups of coffee to accompany us while writing code. Super thanks.
You can install the package via composer:
composer require kanekescom/laravel-helperia
Make your class return the functionality of another class. This is useful when you want your logic to be returned as another class, Laravel Collection for example.
Here's an example of how to use it to make your classes feel like Laravel Collections.
use Kanekescom\Helperia\Traits\HasMethodCaller;
class MyClass
{
use HasMethodCaller;
protected $class;
public function __construct($array = [])
{
$this->class = collect($array);
}
}
or use ClassExtender
instead
use Kanekescom\Helperia\Support\ClassExtender;
class MyClass extends ClassExtender
{
public function __construct($array = [])
{
$this->class = collect($array);
}
}
Get the methods that a class has based on its visibility type. Returned as Laravel Collection.
Get public methods
method_public(MyClass::class);
Get protected methods
method_protected(MyClass::class);
Get private methods
method_private(MyClass::class);
Convert date format
convert_date_format('01-01-2024', 'd-m-Y', 'Y-m-d', $default = null);
Parse date to format.
parse_date_format('01-01-2024', 'Y-m-d', $default = null);
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.