• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make routes case insensitive

#5
@UzairAli001,

I trap case insensitive URLs in Controllers:

Code:
# ==========================================
public function urls($url='')
{
   // BaseController -> data['urls'];
   // $this->data['urls'] = case sensitive array of permitted URLs

   if( in_array($url, $this->data['urls']) ) :
      return view('v_subpage/'.$url .'/index', $this->data);

   elseif( empty($url) ) :   
      return view('v_homepage', $this->data);

   else:
      $this->data['title'] = $this->data['title'] . ' DOES NOT EXIST???';
      $this->data['menu']  = view('incs/_menu', $this->data);

      return view('v_subpage', $this->data);
   endif;   
}//
Reply


Messages In This Thread
RE: How to make routes case insensitive - by John_Betong - 03-28-2021, 07:56 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.