Posted By

rafaelfragosom on 09/19/12


php routes profile laravel

Versions (?)

Laravel User Profile

 / Published in: PHP

This is a route that ables the website to show the user's profile to the world.

  1. Route::get('(:any)', function($username){
  2. $user = User::where_username($username)->first();
  3. if ($user) {
  4. return "The user exist, show the profile.";
  5. }
  6. return Response::error('404');
  7. });

Report this snippet  

You need to login to post a comment.