Skip to main content

codeigniter Model-View-Controller

 

Model-View-Controller

CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.

  • The Model represents your data structures. Typically your model classes will contain functions that help you retrieve, insert, and update information in your database.
  • The View is the information that is being presented to a user. A View will normally be a web page, but in CodeIgniter, a view can also be a page fragment like a header or footer. It can also be an RSS page, or any other type of “page”.
  • The Controller serves as an intermediary between the Model, the View, and any other resources needed to process the HTTP request and generate a web page.

CodeIgniter has a fairly loose approach to MVC since Models are not required. If you don’t need the added separation, or find that maintaining models requires more complexity than you want, you can ignore them and build your application minimally using Controllers and Views. CodeIgniter also enables you to incorporate your own existing scripts, or even develop core libraries for the system, enabling you to work in a way that makes the most sense to you.

Comments

Popular posts from this blog

Mail With Laravel

Step-1    php artisan make:mail TestMail Step-2 change In .env File MAIL_MAILER =smtp MAIL_HOST =smtp.gmail.com MAIL_PORT = 587 MAIL_USERNAME =yourmail@gmail.com MAIL_PASSWORD =hearyourpassword MAIL_ENCRYPTION =tls MAIL_FROM_ADDRESS =yourmail@gmail.com MAIL_FROM_NAME = " ${ APP_NAME } " Step-3   php artisan serve   Step-4 In Controller ->Function $details =[              'title' => "Mail from Laravel" ,              'body' => "This mail laravel test mail i'll try" ,         ];          Mail :: to ( "sendermail@gmai.com" )-> send ( new   TestMail ( $details ));          return   "Mail Send" ; Step-5   Change in TestMailFile public   $details ;        /**      * Create a new message instance.      *      *  @return   void      */      public   function   __construct ( $details )     {          $this -> details = $details ;     }        /**      * Build the message.      *      *  @return  $this      */

How to change or Re forceRerender Page After Login in VueJS

Main.js import   Vue   from   'vue'   Vue . config . productionTip  =  false export   const   bus  =  new   Vue (); login.vue function login() {      bus . $emit ( "changeIt" ,  response . data ); } Navbar.vue export   default  {   forceRerender () {      bus . $on ( "changeIt" ,  data   =>  {        this . user  =  true ;        this . uname  =  data ;     });   }, async   created () {      bus . $on ( "changeIt" ,  data   =>  {        this . uname  =  data . email ;       }     } }

How Apps Manager Can Boost Your Revenue as an Application Publisher

How Apps Manager Can Boost Your Revenue as an Application Publisher If you are an application publisher, you know how challenging it can be to manage your apps across different platforms, devices, and markets. You have to deal with multiple app stores, payment methods, analytics tools, and user feedback channels. You also have to optimize your app performance, monetization, and marketing strategies to stay ahead of the competition. That's where Apps Manager comes in. Apps Manager is a comprehensive and innovative system that helps you manage your apps with ease and efficiency. Apps Manager lets you: •  Publish your apps to multiple app stores with one click •  Track your app downloads, ratings, reviews, and revenue across all platforms •  Integrate with popular payment gateways and ad networks to monetize your apps •  Analyze your app usage, retention, and engagement metrics with powerful analytics tools •  Engage your users with push notifications, in-app messages, and surveys •