Why does the Laravel routing order affect the return content?

I just learned the laravel framework and found that the order of routes will affect the content played. Why?
normal code:

Route::get("posts",function (){
    return "index";
});

Route::get("posts/create",function (){
    return "create";
});

Route::get("posts/{post}",function (){
    return "post";
});

exception code:

Route::get("posts",function (){
    return "index";
});

Route::get("posts/{post}",function (){
    return "post";
});

Route::get("posts/create",function (){
    return "create";
});

there is no difference between the two pieces of code, except that the routing order is different. When accessing the post/create route, the exception code returns the contents of posts/ {post} .

Feb.28,2021

first of all, the route will be matched in the route file, and if the match is successful, it will be returned immediately and will not be executed any further.

posts/create satisfies the matching rule of posts/ {post} , so posts/ {post} is put in front, and posts/create will be hit.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e51275-45115.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e51275-45115.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?