Support the ongoing development of Laravel.io →
Input Views Architecture
Last updated 2 years ago.
0

It's a tricky one to explain in a forum. You have the basic gist...

Model In Laravel, you would generally use the model for 'getting' or 'setting' data. Known as Accessors and Mutators. The model is also the place where you would define relationships with other models. There is more to it than that, but I'll leave it there so not to confuse things.

Controller Controls the data flow. This can include your queries to the databse and also incorporate the Accessor/Mutator data from earlier. The controller is basically the boss that tells the view what to show and what the model should store.

View This the easy one. Just displays the data that has been passed to it from the controller. If you have forms etc, then when you submit it, you would pass this info to the controller that then handles what to do with it - store it in the db, fire off an email etc.

There are a load great tutorials at http://laracasts.com - worth checking out. The more you watch, the more things will sink in. There is nothing like getting stuck in with a dummy project. I found this useful anyway. I read and read, watched video after video and it is only when I got stuck into it, that it stuck. Sure you will mess up along the way, but you'll learn quickly.

Hope it helps.

Last updated 2 years ago.
0

I just want to share you this tutorial. Complete Laravel Ajax CRUD operation with Search, Sort, and pagination https://laracast.blogspot.com/2016/06/laravel-ajax-crud-search...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

XenitXTD xenitxtd Joined 15 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.