I defined a route in Laravel as:
/*Create Commission (POST)*/
Route::post('/commissions/create', array(
'as' => 'commission-create-post',
'uses' => 'CommissionController@postCreate',
));
But am getting error message: Route [commission-create-post] not defined.
Also when I look up the routes using php artisan routes
in Command Prompt it is not showing up.
I have used similar code for other routes but do not understand why this is not working. Any and all help understanding where I went wrong or how to fix the problem would be greatly appreciated! Thank you so very much!
Edit
Here is the link in the Nav:
<li><a href="{{ URL::route('commission-create') }}">A Commission</a></li>
Here is the function in the CommissionController
public function getCreate(){
return View::make('commissions.create');
}
It leads to a form for creating a commission. The form will display only if I remove the
commission-create-post
part of
{{ Form::open(array('route'=>'commission-create-post', 'name' => 'commission_form', 'id' => 'commission_form')) }}
If I don't I get the error message saying that route is not defined despite clearly being defined in my routes file.