I am continuing the above samples.Before see this post kindly make a note on above samples.so that it will be easy for you to understand.
Here i had written code in model.Its developer wish to write the code in controller or separate class file.
In Controller
Here Test is class name which is in model.Also in model we create one method name test.In controller we just getting value and pass it to the method and inserting value to database.
In views nothing is changed.
for your reference just posting that also(as same as above samples).
And the output is:
Here i had written code in model.Its developer wish to write the code in controller or separate class file.
In Controller
Here Test is class name which is in model.Also in model we create one method name test.In controller we just getting value and pass it to the method and inserting value to database.
In views nothing is changed.
for your reference just posting that also(as same as above samples).
And the output is: