<?php
namespace Admin;
use \Orm\Model;
class Model_Objecttypes extends \Model
{
protected static $_table_name = 'objects_types';
protected static $_properties = array(
'id', // both validation & typing observers will ignore the PK
'name' => array(
'data_type' => 'varchar',
'label' => 'Name',
'validation' => array('required'),
'form' => array('type' => 'text'),
'default' => 'Nieuw object',
),
'slug' => array(
'data_type' => 'varchar',
'label' => 'Gender',
'form' => array('type' => 'text'),
'validation' => array('required'),
)
);
}
<?php
namespace Admin;
class Controller_Objecttypes extends Controller_Base
{
/**
* The basic welcome message
*
* @access public
* @return Response
*/
public function action_index()
{
$entry = \Admin\Model_Objecttypes::find(2);
var_dump($entry);
// return the rendered HTML to the Request
return \View::forge('objecttypes/index', $this->views)->render();
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!