Created
November 10, 2014 21:54
-
-
Save mattcdavis1/7e53ae55f3c7db6122ed to your computer and use it in GitHub Desktop.
Resource Stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Anomaly\Streams\Addon\Module\Resources\Installer; | |
use Anomaly\Streams\Platform\Field\FieldInstaller; | |
/** | |
* Class UsersFieldInstaller | |
*/ | |
class ResourcesFieldInstaller extends FieldInstaller | |
{ | |
/** | |
* Fields to install. | |
* | |
* @var array | |
*/ | |
protected $fields = [ | |
'title' => [ | |
'type' => 'text', | |
], | |
'name' => [ | |
'type' => 'text', | |
], | |
'slug' => [ | |
'type' => 'slug', | |
'settings' => [ | |
'separator' => '-', | |
] | |
], | |
'content' => [ | |
'type' => 'repeating', | |
], | |
'description' => [ | |
'type' => 'text', | |
], | |
'category' => [ | |
'type' => 'text', | |
], | |
'author' => [ | |
'type' => 'text', | |
], | |
'tags' => [ | |
'type' => 'text', | |
], | |
'tagss' => [ | |
'type' => 'text', | |
], | |
]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Anomaly\Streams\Addon\Module\Resources\Installer; | |
use Anomaly\Streams\Platform\Stream\StreamInstaller; | |
/** | |
* Class ResourcesStreamInstaller | |
*/ | |
class ResourcesStreamInstaller extends StreamInstaller | |
{ | |
/** | |
* Stream field assignments. | |
* | |
* @var array | |
*/ | |
protected $assignments = [ | |
'title' => ['is_required' => true], | |
'slug' => ['is_required' => true], | |
'category' => ['is_required' => true], | |
'description' => [], | |
'author' => [], | |
'tags' => [], | |
'tagss' => [], | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment