\AppPost

Posts represent resources uploaded by the user.

Each post has tags, a description as well as multiple documents.

Summary

Methods
Properties
Constants
owner()
documents()
tags()
folders()
syncTags()
syncDocuments()
setDescription()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
assignDocumentToDocumentVersion()
No private properties found
N/A

Methods

owner()

owner() : \Illuminate\Database\Eloquent\Relations\BelongsTo

Relationship to the post's owner.

Returns

\Illuminate\Database\Eloquent\Relations\BelongsTo

documents()

documents() : \Illuminate\Database\Eloquent\Relations\HasMany

Relationship to documents.

Returns

\Illuminate\Database\Eloquent\Relations\HasMany

tags()

tags() : \Illuminate\Database\Eloquent\Relations\HasMany

Relationship to tags.

Returns

\Illuminate\Database\Eloquent\Relations\HasMany

folders()

folders() 

syncTags()

syncTags(  $tags) 

Synchronize the tags of the model with the given list of tags: Remove all tags which do not appear in the list and add the missing tags.

Parameters

$tags

array list of tag values

syncDocuments()

syncDocuments(  $documents) 

Synchronize the documents of the model with the given list of documents: Remove all documents which do not appear in the list and add the missing tags.

Parameters

$documents

array list of documents

setDescription()

setDescription(  $desc) 

Description mutator Clean the description of invalid tags before writing it to the model field.

Parameters

$desc

string description

assignDocumentToDocumentVersion()

assignDocumentToDocumentVersion(  $uuid,   $documentId, integer  $version) 

Helper method of assigning a document document to a document version.

Parameters

$uuid

string document version uuid

$documentId

int document id

integer $version

int document version (defaults to 0)