Webdeveloper
Webdeveloper

Reputation: 1

How to create a subfolder inside controller and view folders in codeigniter?

I wanted to create a folder named 'schoollevel' inside controller and view folder to create a separate module containing login function and profile views to provide another login functionality for some users. The 'schoollevel' contains all the files for login and profile view. Can anyone suggest how to do this ? I want the control to go to the separate folder.

Upvotes: 0

Views: 588

Answers (1)

Ghanshyam Nakiya
Ghanshyam Nakiya

Reputation: 1712

Its Easy to create folder in controller and view in codeigniter.

Folder name : school

1.create a login controller

 application->controller->school->Login.php
  1. create a login view

    application->view->school->login.php
    

Now, How to call view file

Inside login controller in the index() function add

this to call login.php view

$this->load->view('school/login');

I hope this help you!

Upvotes: 1

Related Questions