Skip to content

Widget class must extend Arrilot\Widgets\AbstractWidget class #19

@bsh314

Description

@bsh314

I was having trouble getting Widgets work on Laravel 5.1. My app runs throw ErrorException, this is it:

ErrorException in AbstractWidgetFactory.php line 122:
Widget class must extend Arrilot\Widgets\AbstractWidget class (View: /home/vagrant/Code/Laravel/resources/views/welcome.blade.php)

My Widget Class was created with artisan command 'artisan make:widget Input'
and it extends AbstractWidget from Arrilot\Widgets\AbstractWidget. So here is class:

<?php namespace App\Widgets;

use Arrilot\Widgets\AbstractWidget;

class Input extends AbstractWidget {
    protected $config = [
        'type' => 'text'
    ];
    public function run()
    {
        return view("widgets.input", [
            'config' => $this->config,
        ]);
    }
}

What can it be?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions