Welcome Guest, Not a member yet? Register   Sign In
another routing problem :) please help
#1

Hi,
PHP Code:
  
I create Blog, and in Blog Controller I hane method index, who select all posts and method 'wpis':

 public function wpis($id)
    {
      $dzis = Time::today('Europe/Warsaw', 'pl_PL');
      $data['menu']=1; 
      $modelw = new Blog_m();
       
      if(isset($id))
          {
            $data['id']=$id;
          }
          else
          {
            return redirect()->to('blog');
          }

etc...
And in Routing I put:
PHP Code:
$routes->get('''FRONT/Page::index');
$routes->get('/''FRONT/Page::index');
$routes->get('blog''FRONT/Blog::index'); - work
$routes
->get('wpis/(:num)''FRONT/Blog::wpis/$1'); - -this not works :(
"

Controller or its method is not found: \App::index
"

but, if I remove $
PHP Code:
$routes->get('wpis/(:num)''FRONT/Blog::wpis');

PHP Code:
Too few arguments to function App\Controllers\FRONT\Blog::wpis(), 0 passed in 

$routes->ge
Reply


Messages In This Thread
another routing problem :) please help - by Kordianz - 02-12-2022, 02:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB