Hi I'm trying to implement this plugin om the blog plugin but I just keep getting this error when I want to add a photo:
"Class 'October\Rain\Support\Facades\Validator' not found" on line 77 of /srv/users/…/plugins/sunlab/unsplashpicker/formwidgets/UnsplashPicker.php
What am I doing wrong?
use System\Classes\PluginBase;
use RainLab\Blog\Controllers\Posts as PostsController;
use RainLab\Blog\Models\Post as PostModel;
class Plugin extends PluginBase
{
public $require = [
'RainLab.Blog',
'SunLab.UnsplashPicker',
];
public function boot()
{
PostsController::extendFormFields(function ($form, $model) {
if (!$model instanceof PostModel) return;
$form->addSecondaryTabFields([
'featured_images' => [
'tab' => 'rainlab.blog::lang.post.tab_manage',
'label' => 'rainlab.blog::lang.post.featured_images',
'type' => 'unsplashpicker',
'mode' => 'image',
'maxFilesize' => '12',
'imageWidth' => '200',
'imageHeight' => '200',
'attachOnUpload' => 'true'
]
]);
});
}
}
Last updated