1. Go to this page and download the library: Download yuniorhernandez/alertsli library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yuniorhernandez / alertsli example snippets
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 ]);
// 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