enter code here
I have created a module for fetching data from table but when i run the module i am getting a fatal error saying cannot re-declare class. I have only one class called hello. This is my first time creating a module, i don't have experience in magento 1 Link for module source code github
Block\Helloworld.php
<?php
namespace Devchannel\Helloworld\Block;
use Magento\Framework\View\Element\Template\Context;
use Devchannel\Helloworld\Model\Data;
use Magento\Framework\View\Element\Template;
class Hello extends Template
{
public function __construct(Context $context, Data $model)
{
$this->model = $model;
parent::__construct($context);
}
public function sayHello()
{
return __('Hello World');
}
public function getHelloCollection()
{
$helloCollection = $this->model->getCollection();
return $helloCollection;
}
}