Can somebody explain the syntax of the Laravel 4 UrlGenerator class? I can\'t find it in the documentation.
I have the following route:
Well there is a better way of generating URLs when working with resources.
URL::route('users.index') // Show all users links to UserController@index
URL::route('users.show',$user->id) // Show user with id links to UserController@show($id)
URL::route('users.create') // Show Userform links to UserController@create
URL::route('users.store') // Links to UserController@store
URL::route('users.edit',$user->id) // Show Editform links to UserController@edit($id)
URL::route('users.update',$user->id) // Update the User with id links to UserController@update($id)
URL::route('users.destroy',$user->id) // Deletes a user with the id links to UserController@destroy
Hope that clears things up. Some Documentation on this can be found here http://laravel.com/docs/controllers#resource-controllers