02-23-2021, 11:12 AM
Hi! I have a view with this link:
.tb_button {padding:1px;cursor:pointer;border-right: 1px solid #8b8b8b;border-left: 1px solid #FFF;border-bottom: 1px solid #fff;}.tb_button.hover {borer:2px outset #def; background-color: #f8f8f8 !important;}.ws_toolbar {z-index:100000} .ws_toolbar .ws_tb_btn {cursor:pointer;border:1px solid #555;padding:3px} .tb_highlight{background-color:yellow} .tb_hide {visibility:hidden} .ws_toolbar img {padding:2px;margin:0px}
I would like pass the $slug variable to my method named article but i have an error: Too few arguments to function App\Controllers\En\Main::article(), 0 passed in...
My method:
I have read here: https://codeigniter.com/userguide4/incom...ur-methods
Someone can help me please? Thanks.
Code:
<a href="<?php echo base_url('en/article/'.$slug);?>"> Article Title </a>
.tb_button {padding:1px;cursor:pointer;border-right: 1px solid #8b8b8b;border-left: 1px solid #FFF;border-bottom: 1px solid #fff;}.tb_button.hover {borer:2px outset #def; background-color: #f8f8f8 !important;}.ws_toolbar {z-index:100000} .ws_toolbar .ws_tb_btn {cursor:pointer;border:1px solid #555;padding:3px} .tb_highlight{background-color:yellow} .tb_hide {visibility:hidden} .ws_toolbar img {padding:2px;margin:0px}
I would like pass the $slug variable to my method named article but i have an error: Too few arguments to function App\Controllers\En\Main::article(), 0 passed in...
My method:
PHP Code:
public function article($slug)
{
$data['article'] = $this->articlesModel->where('slug', $slug)->first();
// OTHER...
Someone can help me please? Thanks.