tournasdim
6/24/2013 - 7:30 PM

A skeleton of a Laravel 4 Restfull Controller (not namespaced)

A skeleton of a Laravel 4 Restfull Controller (not namespaced)

<?php

class TestController extends BaseController {

	/**
	 * Setup the root action of this controller.
	 *
	 * @return void
	 */
	public function getIndex()
	{
		return "hello from getIndex action " ; 
	}

	/**
	 * Setup the structure for a POST request.
	 *
	 * @return void
	 */
	public function postIndex()
	{
		return "hello from postIndex action " ; 
	}

	/**
	 * Setup the structure for another get-action .
	 *
	 * @return void
	 */
	public function getDimas()
	{
		return "hello from getDimas action " ; 
	}

	/**
	 * Setup a "Action not found" .
	 *
	 * @return void
	 */
	public function missingMethod($parameters)
	{
    	return "Sorry this is not applicable"  ; 
	}

}