Giter VIP home page Giter VIP logo

alertsli's Introduction

Alerst.li

Access the Alerts.LI API, create short and friendly URLs for your text messages and emails.

See this: https://www.tu-pagina-web.com/invlice/19503850/view

to this: www.alerts.li/LS3071

Installation

Use the package manager composer to install Alerst.li.

composer require yuniorhernandez/alertsli

Usage

<?php

namespace App\Http\Controllers;

use App\Models\Invoice;
use Illuminate\Http\Request;
use Yuniorhernandez\Alertsli\Facades\Alertsli;

class InvoiceController extends Controller
{
    public function send_message(Invoice $invlice){
        // Link to include in the message
        $link = Alertsli::createLink([
            'title' => 'Link to Invoice',
            'url' => "https://www.your-web-page.com/invoice/" . $invlice . "/view",
            'description' => 'Link to invoice view.',
            'is_disabled' => false,
        ]);

        // Message
// Create a new link.
$link = Alertsli::createLink([
     'title' => 'Link title',
     'url' => "Destination URL, visitors will be directed to this address.",
     'description' => 'Link description, optional',
     'is_disabled' => false, //If it is true, the link will be deactivated.
 ]);
// return array
{
    "title": "Link to Invoice",
    "access_link": "http://alerts.li/L110034",
    "code": "L110034",
    "url": "https://www.your-web-page.com/invoice/AH7420HL004-20230917/view",
    "description": "Link to invoice view.",
    "is_disabled": 0,
    "created_at": "2023-09-16T16:26:39.000000Z",
    "updated_at": "2023-09-16T16:26:39.000000Z"
}
$options = [
    "per_page" => 25 // optional, intege between 1 / 100
    "order" => "asc" // optional, {'asc'. 'desc'} default:desc
    "page" => 2 // optional, navigate between pages if available
]
$links = Alertsli::getAll($options); // return array
$code = 'AL6399'; // Link code
$link = Alertsli::getLink($code); // return array
$code = 'AL6399'; // Link code
$data = [
    'title' => 'Link to Invoice',
    'url' => "https://www.your-web-page.com/invoice/" . $invlice . "/view",
    'description' => 'Link to invoice view.',
    'is_disabled' => false,
];
$link = Alertsli::updateLink($code, $data) // return array
$code = 'AL6399'; // Link code
$response = Alertsli::deleteLink($code) // return a message Acepted/Not found
$code = 'AL6399'; // Link code
$options = [
    "per_page" => 25 // optional, intege between 1 / 100
    "order" => "asc" // optional, {'asc'. 'desc'} default:desc
    "page" => 2 // optional, navigate between pages if available
]
$all_clicks = Alertsli::allClicks($code, $options) // return array

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

alertsli's People

Contributors

yuniorhernandez avatar

Stargazers

 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.