/ Published in: PHP
This is a route that ables the website to show the user's profile to the world.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Route::get('(:any)', function($username){ $user = User::where_username($username)->first(); if ($user) { return "The user exist, show the profile."; } return Response::error('404'); });