Access to the controller in CodeIgniter [duplicated]

0

I have a query in CodeIgniter , I have a controller with which I do specific jobs and I do not want to have access to it through the url , example,

http://miproyecto/tareas/index

That only shows your data in a% central layout I have implemented, as I should do, I think and I'm not sure that the solution is in the file Routes , any suggestions? .

    
asked by Esteban Quijada Suazo 19.06.2017 в 01:52
source

1 answer

0

You can work with relative Routes, this is done in the file config / routes.php

in the file you can configure the route as you wish

$route['NombreQueQuieras']              = 'tareas';
$route['NombreQueQuieras']              = 'tareas/funcion2';

With that simple route, we are telling codeigniter that we have a controller called tasks, and within a method called function2. with this you can make different calls to methods within your controller

    
answered by 19.06.2017 в 03:25