File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -85,4 +85,11 @@ public function profile()
8585 {
8686 return $ this ->render ('profile ' );
8787 }
88- }
88+
89+ public function profileWithId (Request $ request )
90+ {
91+ echo '<pre> ' ;
92+ var_dump ($ request ->getBody ());
93+ echo '</pre> ' ;
94+ }
95+ }
Original file line number Diff line number Diff line change 2424
2525$ app = new Application (dirname (__DIR__ ), $ config );
2626
27- $ app ->on (Application::EVENT_BEFORE_REQUEST , function (){
27+ /* $app->on(Application::EVENT_BEFORE_REQUEST, function(){
2828 echo "Before request from second installation";
29- });
29+ });*/
3030
3131$ app ->router ->get ('/ ' , [SiteController::class, 'home ' ]);
3232$ app ->router ->get ('/register ' , [SiteController::class, 'register ' ]);
3333$ app ->router ->post ('/register ' , [SiteController::class, 'register ' ]);
3434$ app ->router ->get ('/login ' , [SiteController::class, 'login ' ]);
35+ $ app ->router ->get ('/login/{id} ' , [SiteController::class, 'login ' ]);
3536$ app ->router ->post ('/login ' , [SiteController::class, 'login ' ]);
3637$ app ->router ->get ('/logout ' , [SiteController::class, 'logout ' ]);
3738$ app ->router ->get ('/contact ' , [SiteController::class, 'contact ' ]);
3839$ app ->router ->get ('/about ' , [AboutController::class, 'index ' ]);
3940$ app ->router ->get ('/profile ' , [SiteController::class, 'profile ' ]);
41+ // /profile/{id}
42+ // /profile/13
43+ // \/profile\/\w+
4044
41- $ app ->run ();
45+ // /profile/{id}/zura
46+ // /profile/12/zura
47+
48+ // /{id}
49+ $ app ->run ();
You can’t perform that action at this time.
0 commit comments