aaronlord / laroute

Generate Laravel route URLs from JavaScript.
MIT License
796 stars 138 forks source link

Strips out optional parameters on a route if not supplied #10

Closed stanfieldr closed 10 years ago

stanfieldr commented 10 years ago

Before if I had a route such as:

Route::get('editor/{id?}', array(
    'as' => 'designer.edit',
    'uses' => 'Focus\FormBuilder\Controller\FormBuilderController@edit'
));

laroute would replace the optional parameter with undefined.

laroute.route('designer.edit'); // yields /editor/undefined

However, now laroute will strip out the optional parameter.

laroute.route('designer.edit') // yields /editor
ghost commented 10 years ago

Is there any progress or status on this pull request? I guess the merge conflict is in the minified version.

aaronlord commented 10 years ago

Whoops. Apologies, this slipped under my todos radar.

ghost commented 10 years ago

No problem and thanks for merging. :+1: