PHP code example of minerva / orm

1. Go to this page and download the library: Download minerva/orm library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

minerva / orm example snippets




namespace Acme\Example\Repository;

use Minerva\Orm\BasePdoRepository;

class BlogRepository extends BasePdoRepository
{
    
}

$blogRepo = new PdoBlogRepository($pdo);
$blogs = $blogRepo->findAll(); // returns a list of all blog objectstore
$blog = $blogRepo->find(1); // returns blog with id 1