I'm looking to have an optional parameter on the index route like so:
$app->get('/{name?}', function ($name) {
//Do Something here
});
I basically want to check and see if there is a parameter supplied. If so return a specific view, if not return the standard index view. For the life of me I can't get it to work, more than likely doing something stupid! Any help would be greatly appreciated!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire