Git Product home page Git Product logo

laravel-helperia's Introduction

Laravel Helperia

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Helper for rapid Laravel development improvements. This library is a function and class to help improve Laravel development.

Support us

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.

We highly appreciate you sending us a few cups of coffee to accompany us while writing code. Super thanks.

Installation

You can install the package via composer:

composer require kanekescom/laravel-helperia

Usage

HasMethodCaller

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

ClassExtender

use Kanekescom\Helperia\Support\ClassExtender;

class MyClass extends ClassExtender
{
    public function __construct($array = [])
    {
        $this->class = collect($array);
    }
}

Get Methods of Class

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

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);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

laravel-helperia's People

Contributors

achmadhadikurnia avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.