MVC は初めてで、codeignator を使用して既存のプロジェクトを MVC に変換しようとしています。以下は、現在のプロジェクト構造とその内容です。
どのメソッドがどのコントローラーに行くのか知りたかったのです。ここでガイダンスが本当に役に立ちます。
index.php //contains links to students.php, professors.php, student_prof.php, admin/index.php
students.php //lists all students
professors.php //lists all professors
stud_prof.php //lists both students along with thier respective professors
admin //folder
index.php //login page
students.php // add, edit, delete, list students
professors.php // add, edit, delete, list professors
logout.php //logout for admin
私の試み:
models
Students_model //add, edit, delete, list methods
Professors_model //add, edit, delete, list methods
Admin //login method
controllers
Index // show_links method
Students //add, edit, delete, list students methods
Professors //add, edit, delete, list professors methods
Admin //login, logout methods