I'm following this guide :


But at the end i get the error

Fatal error: Class 'Magento\Framework\Model\Resource\Db\AbstractDb' not found in C:\wamp\www\eurecia-shop\app\code\Local\Providers\Model\Resource\providers.php on line 7

(I follow the tutorial, but i just change News by Providers, but it work the same)

this is my file where i get the error :

namespace Local\Providers\Model\Resource;
use Magento\Framework\Model\Resource\Db\AbstractDb;

class Providers extends AbstractDb

    * Define main table
   protected function _construct()
       $this->_init('local_providers', 'id');

I search on google, and no result for this. I'm new to magento, so i'm not really familiar with it.

1 Answer 1


Change Magento\Framework\Model\Resource\Db\AbstractDb

to Magento\Framework\Model\ResourceModel\Db\AbstractDb

  • Yes, thanks, i find it also after more search, i find a facebook post where someone ask, and one good comment on it xD Commented Apr 25, 2017 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.