I'm really new to Laravel, and am trying to just get a Form to work in general.
So I have a page (admin/index) that just have a form to it that has the route that maps to AdminController@test. The form submits fine but then I get a NotFoundHttpException. :(
The code for the form builder in index.blade.php is:
@extends('layouts.master')
@section('title')
Admin
@stop
@section('content')
{{ Form::open(array('route' => 'test', 'method' => 'get')) }} <!-- Works with AdminController@index -->
{{ Form::text('info') }}
{{ Form::close() }}
@stop
The route in question is:
Route::get('/admin/test/' , array( 'as' => 'test' ,
'uses' => 'AdminController@test'));
And the controller in question is:
class AdminController extends BaseController{
public function index(){
return View::make('admin.index');
}
public function test(){
error_log('Yay!');
}
}
Like I said, simple form on admin/index , submits, but it doesn't make it to the controller, just to the NotFoundHttpException.
Edit: The form's HTML looks like this:
<form method="GET" action="http://localhost/showknowledge/admin/test/"
accept-charset="UTF-8">
<input name="info" type="text">
</form>
{{ Form::open(array('action' => 'AdminController@test', 'method' => 'get')) }}- msturdyYayto the Log, right? - msturdyRoute::get('admin/test/' , array( 'as' => 'test' , 'uses' => 'AdminController@test'));- msturdy