PHP code example of laravel-afterburner / documents
1. Go to this page and download the library: Download laravel-afterburner/documents 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/ */
use Afterburner\Documents\Concerns\HasDocumentLinks;
use Afterburner\Documents\Actions\LinkDocument;
use Afterburner\Documents\Actions\UnlinkDocument;
class Meeting extends Model
{
use HasDocumentLinks;
}
// Link
app(LinkDocument::class)->execute($document, $meeting, $user);
// Unlink
app(UnlinkDocument::class)->execute($document, $meeting, $user);
// Query linked documents
$meeting->linkedDocuments;