I'm having trouble creating ONE laravel route that has an optional parameter. The following achieves the behaviour I want:
Route::get('/{locale}/donate', 'MyController@index')->name('donation.index');
Route::get('/donate', 'MyController@index')->name('donation.index');
Both the urls /fr/donate and /donate will load the MyController index(). However, when I do this:
Route::get('/{locale?}/donate', 'MyController@index')->name('donation.index');
The /donate will not load the MyController index(). How do I make the locale argument an optional segment in the url?