Skip to content

Instantly share code, notes, and snippets.

@insign
Created September 15, 2013 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save insign/6568118 to your computer and use it in GitHub Desktop.
Save insign/6568118 to your computer and use it in GitHub Desktop.
@extends('master')
@section('content')
:) Test
@stop
<?php
class ItemsController extends BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index() {
$data = [
'items' => Item::all(),
];
return View::make('items.index', $data);
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create() {
return View::make('items.create');
}
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store() {
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return Response
*/
public function show($id) {
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($id) {
//
}
/**
* Update the specified resource in storage.
*
* @param int $id
* @return Response
*/
public function update($id) {
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id) {
//
}
}
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::resource('/', 'HomeController');
Route::group(array('before' => 'auth'), function() {
Route::resource('/itens', 'ItemsController');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment