Giter Club home page Giter Club logo

support's Introduction

Support

A support package that provides flexible and reusable helper methods and traits for commonly used functionalities.

๐Ÿ“ฆ Requirements

The package requires PHP 8.0+ and follows the FIG standard PSR-4 to ensure a high level of interoperability between shared PHP code and is fully unit-tested.

๐Ÿ“‹ Features

  • Easy register an event listener with the dispatcher.
  • Easy begin the process a mailable.
  • Easy to validate your application's incoming data.
  • Allowing you to subscribe and listen for various events that occur within your application easily.
  • And much more!

๐Ÿ”ง Installation

Install the package with the below command:

composer require vspc/support

๐Ÿ“ Usage

In this section, we'll show how you can make use of the available traits.

  • The EventTrait makes it easy to add dispatching abilities to your classes.
<?php

use Vspc\Support\Traits\EventTrait;

class FooRepository
{
    use EventTrait;

    public function foo()
    {
        $this->fireEvent('foo');
    }
}
  • The RepositoryTrait makes it easy to create new instances of a model and to retrieve or override the model during runtime.
use Vspc\Support\Traits\RepositoryTrait;

class FooRepository
{
    use RepositoryTrait;

    public function foo()
    {
        return $this->createModel();
    }
}

๐Ÿ“จ Message

I hope you find this useful. If you have any questions, please create an issue.

๐Ÿ” Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

๐Ÿ“– License

This software is released under the BSD 3-Clause License. Please see the LICENSE file or https://vspc.vn/license for more information.

โœจ Contributors

Thanks goes to these wonderful people (emoji key):

Son Tran Thanh
Son Tran Thanh

๐Ÿ’ป ๐Ÿ“

This project follows the all-contributors specification. Contributions of any kind welcome!

support's People

Contributors

trants avatar

Watchers

 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.