Last active
August 29, 2015 14:13
-
-
Save tommymarshall/e90112157a8d76c6d4f1 to your computer and use it in GitHub Desktop.
Route::post() requests never get matched, requests always end up matching Route::get(). Here's a gif of what's happenning: http://cl.ly/image/3s0X0q2p0r1o
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PagesController extends BaseController | |
{ | |
public function home() { | |
return View::make("pages.home"); | |
} | |
public function about() { | |
return View::make("pages.about"); | |
} | |
public function vision() { | |
return View::make("pages.vision"); | |
} | |
public function subscription() { | |
return View::make("pages.subscription"); | |
} | |
public function create() { | |
die(var_dump(Input::all())); | |
exit; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Home | |
Route::get('home', 'PagesController@home'); | |
// Pages | |
Route::get('page', [['about'], 'uses' => 'PagesController@about']); | |
Route::get('page', [['vision'], 'uses' => 'PagesController@vision']); | |
Route::get('page', [['subscription'], 'uses' => 'PagesController@subscription']); | |
// Subscription | |
Route::post('page', [['subscription'], 'uses' => 'PagesController@create']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.base') | |
@section('content') | |
<h1>Subscribe</h1> | |
{{ Form::open('subscription') }} | |
Name: <input type="text" name="name" id="name"><br> | |
Email: <input type="email" name="email" id="email"><br> | |
<input type="submit" value="Submit"> | |
{{ Form::close() }} | |
@stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great 😄 A 1.1.1 minor update should be available for the end of the week so you'll be up to date for using the framework on your projects.