10-26-2020, 02:50 AM
Hello Everyone,
I am using CI 4.0.4
XAMPP CONTROL 3.2.4
I AM USING CI 4.0.4 FOR MY ONGOING LIVE PROJECT
CURRENTLY I AM FACING SOME ISSUE
MY WEBSITE URL : http://localhost/shashi/public/ , i am not using spark
I HAVE CREATED A CONTROLLER
In App\Routes:
Now when i open :
http://localhost/shashi/public/dash/dashboard
http://localhost/shashi/public/dash/adddash
page opens and filter -> auth ( session check for login user ) also work - as i check in 2 bowers
but suppose i open
http://localhost/shashi/public/dash/dashboard/addsystemprice
page open , but why filter is not working ??
as it already route to http://localhost/shashi/public/dash/adddash
any thing missing ?
if some one can get my controller/methods name - then he/she can open the page and do the wrong stuff - as filter is not working which has session check for login user
please let me know
I am using CI 4.0.4
XAMPP CONTROL 3.2.4
I AM USING CI 4.0.4 FOR MY ONGOING LIVE PROJECT
CURRENTLY I AM FACING SOME ISSUE
MY WEBSITE URL : http://localhost/shashi/public/ , i am not using spark
I HAVE CREATED A CONTROLLER
Code:
<?php namespace App\Controllers;
class Dashboard extends BaseController
{
public function index()
{
$data = [];
echo view('templates/header', $data);
echo view('dashboard');
echo view('templates/footer');
}
//--------------------------------------------------------------------
public function addsystemprice()
{
$data = [];
echo view('templates/header', $data);
echo view('addsystem');
echo view('templates/footer');
}
}
In App\Routes:
Code:
$routes->group('dash',['filter' => 'auth'], function($routes) {
$routes->get('dashboard', 'Dashboard::index',['namespace' => 'App\Controllers\Dash']);
$routes->get('adddash', 'Dashboard::addsystemprice',['namespace' => 'App\Controllers\Dash']);
});
Now when i open :
http://localhost/shashi/public/dash/dashboard
http://localhost/shashi/public/dash/adddash
page opens and filter -> auth ( session check for login user ) also work - as i check in 2 bowers
but suppose i open
http://localhost/shashi/public/dash/dashboard/addsystemprice
page open , but why filter is not working ??
as it already route to http://localhost/shashi/public/dash/adddash
any thing missing ?
if some one can get my controller/methods name - then he/she can open the page and do the wrong stuff - as filter is not working which has session check for login user
please let me know