Skip to content

Instantly share code, notes, and snippets.

@mtoigo
mtoigo / Controller
Created Oct 25, 2011
Kohana ORM Example
View Controller
<?php
class Controller_Admin_Judges extends Controller_Admin_Base {
public function action_add() {
//Setting various view variables
$this->view->section_title = 'Add a New Judge';
$this->view->body = View::factory('admin/judges/form');
$this->view->body->button_text = 'Add Judge';
//Process our form POST
@mtoigo
mtoigo / Testing
Last active Aug 29, 2015
Testing
View Testing
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/project1/public;
index index.html index.php;
# Make site accessible from http://localhost/
server_name localhost;