I made an error in my routes.php in laravel and typed :
instead of ::
Route:get('about','PagesController@about');
Route:get('contact','PagesController@contact');
and I got an error message Label 'Route' already defined
Just curious what this means...
You've discovered label
s! They are a largely outdated and generally discouraged language construct that allows jumping around code via goto
statements, as well as some others depending on language.
Example:
if (!array_key_exists('data', $_GET)) { goto hell; }
echo $_GET['data'] . " is the data I received.";
hell:
die("Erorr. . . or we finished. Who knows?");
There's some (semi-legitimate) functionality that can be implemented however. That said, still not a good practice:
for ($i = 0; $i < 999; $i++) {
for ($j = 0; $j < 999; $j++) {
for ($k = 0; $k < 999; $k++) {
if ($someCondition)
goto EndOfAllTheLoops; //Look, we broke out of ALL three loops!
}
}
}
EndOfAllTheLoops:
echo "We made it out!"
See PHP docs: http://php.net/manual/en/control-structures.goto.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With