php - how to allow all wildcard string to the routing url in laravel -




i'm developing laravel api.so when during implementation face problem in passing parameters routing url. have pass parameters ,one sessionid , other 1 userid. session id this,

eyjpdii6uiikf6teltnvp1yw5bajltytytyydmvgc9psisinzhbhvlijoiyuiuiuiu081ntdyttfvemnwswfnae1nsmv2stazixtuiuiuiuizfiuunue9psisim1hyiuiuiuiyi6ijjknjjjngnlnwu5otuxzwuwmdrlmzi2ytvimgy0mdfiuiuiumnmi5zmu2nwu2zuiuiuiuim3mwjizdu2zwvkyzfimwi4ogjjnwmifq%3d%3d

so session id contains a-z,a-z,.,etc , wildcard strings (%3d%3d) congaing string

i've try lots of ways pass sessionid string function.but still no proper solution me.

this code segment , routes.php

$api->version('v1',function ($api){ $api->get('oneu/{id?}/{userid}',[     'as'=>'user',     'uses'=> 'app\http\controllers\usercontroller@show'])     ->where(['id' => '.[a-za-z1-9\-_\/?;!"`\'()`\|{}]+']);  }); 

this controller class code segment

  public function show($id,$userid)  {     //  $id='sessionid';     try{      $user=db::table('users')->where('sessionid',$id )                             ->where('userid', $userid )                             ->get();         if(!$user)         {             return response()->json(['null'],404);         }         return $user;      } catch (exception $exception)     {         return response('something bad',500);     } } 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -