Add title for item as suffix in url, only for one controller |
You will need to adapt it in your model and set your route for item/detail/(:num)/(:any)...
PHP Code: protected function setUri($data) This enables you to call URL's like the StackOverflow (base_url/questions/(:num)/(:uri_title)). This is a beforeInsert/beforeUpdate trigger for CodeIgniter 4, one row at a time. Then you can get the item by primary key and have a SEF uri. |
Messages In This Thread |
Add title for item as suffix in url, only for one controller - by kabeza - 03-13-2018, 04:24 PM
RE: Add title for item as suffix in url, only for one controller - by salain - 03-14-2018, 12:27 AM
RE: Add title for item as suffix in url, only for one controller - by kabeza - 03-14-2018, 05:33 AM
RE: Add title for item as suffix in url, only for one controller - by salain - 03-14-2018, 06:06 AM
RE: Add title for item as suffix in url, only for one controller - by natanfelles - 03-14-2018, 06:20 PM
|