File: D:/HostingSpaces/brameda/brameda.nl/app/Komma/Kms/Core/Attributes/Models/Traits/SubFolderTrait.php
<?php
namespace App\Komma\Kms\Core\Attributes\Models\Traits;
trait SubFolderTrait
{
/**
* @var string $subFolder
*/
private $subFolder = '';
/**
* @return string
*/
public function getSubFolder()
{
return $this->subFolder;
}
/**
* @param string $subFolder
* @return $this
*/
public function setSubFolder(string $subFolder)
{
$this->subFolder = str_slug($subFolder);
return $this;
}
/**
* When passing an instance of this class to the json_encode function,
* the data that this method returns will be json_encode'd.
*
* return mixed
*/
public function jsonSerialize()
{
return [
'subFolder' => $this->subFolder
];
}
}