05-10-2020, 11:37 PM
Hi. I wanted to redirect user if there is no parameter passed into the method. But it does not works what should I do?
My Route
My Method inside of the AdminHome class
My Route
PHP Code:
$routes->get('deleteportfolio/(:num)', 'AdminHome::deleteportfolio/$1', ['filter' => 'shouldlogged']);
My Method inside of the AdminHome class
PHP Code:
if (is_null($id) || empty($id)) {
/*echo 'aaaaaa';
die();*/
return redirect()->to('/');
}