Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- | Unauthenticated group
- */
- Route::group(array('before' => 'guest'), function(){
- /*
- | CSRF protection group
- */
- Route::group(array('before' => 'csrf'), function(){
- /*
- | Create Account (POST)
- */
- Route::post('/account/create', array(
- 'as' => 'account-create-post',
- 'uses' => 'AccountController@postCreate'
- ));
- });
- /*
- | Create Account (GET)
- */
- Route::get('/account/create', array(
- 'as' => 'account-create',
- 'uses' => 'AccountController@getCreate'
- ));
- });
- <?php
- class AccountController extends BaseController{
- public function getCreate(){
- return View::make('account.create');
- }
- public function postCreate(){
- return 'Hello.';
- }
- }
- @extends('layouts.master')
- @section('content')
- <form action="{{ URL::route('account-create-post') }}" method="post">
- <input type="submit" value="Create account">
- {{ Form::token() }}
- </form>
- @stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement