4. The MVC Model
● Bootstrap – a URL format
● Model – Business Logic
CRUD = Create, Read, Update and Delete
It caries out the connection with the DBMS
● View
responsible for the representation of the information
● Controller
it “tells” the model which information it has to take
5. The MVC Model
Bootstrap
http://www.mysite.com/Controller/Function/Value
Model Controller View
Business
logic:
- Database
- Formatting
- CRUD
Connects
Model and
view based on
URL
Template(s):
HTML/CSS/
JavaScript
7. RESTful URLs
● REpresentational State Transfer
● Also called resourceful URLs
● URLs that point to a certain resource and provide back the information from
that resource to the user
● Laravel ships with its own .htaccess file in the public/ directory. You need
mod_rewrite of Apache to be activated for the RESTful URLs to work
8. Routes and routing
● app/routes.php
● With the Route class we can describe our
resourceful urls and the resources they will
refer to
9.
10. Troubleshooting
● Good practises for Laravel installation on a
shared host
● VirtualHost configuration for a Laravel
application on a VPS/DS
● See “Important Files in Laravel” to see a list of
importan configurations
11. The artisan CLI tool
Artisan is a PHP CLI tool that ships with Laravel. It can
make your workflow more automatic. It even has its own
web server for testing.
$ php artisan controller:make
$ php artisan routes
$ php artisan serve
We can create and add our own custom artisan commands. Here is a
useful set of third party commands:
https://github.com/JeffreyWay/Laravel-Generators
12.
13. Important files in Laravel
● app/routes.php
● public/ - here are placed the files that will be
“visible”
● public/index.php
● bootstrap/paths.php
● config/database.php
● config/workbench.php