Laravel – Tutorial

PHP OOP

How to install it

You need to get “composer” first

#-> composer create-project –prefer-dist laravel/laravel:^7.0 blog

Laravel has “artisan” file at Root directory.

#-> php artisan key:generate “PHP artisani kosturur, -arguments i pass edersin. ”

web :80/laravel/blog/public/

# -> Routes Located  :    project/routes/web.php
[crayon-60d0e6bb8cad1969806621/]
#-> views Located :    project/resources/views/welcome.blade.php

 

# -> Middleware : Between Request – And Response Filter  (Config Stored at   project/Http/Kernel.php)

  • Global Middleware :  will run on every HTTP request
  • Route Middleware  :

[crayon-60d0e6bb8cae1195362487/]
[crayon-60d0e6bb8cae5616584634/]
[crayon-60d0e6bb8cae7836468456/]
RoleMiddleware
[crayon-60d0e6bb8cae9592571884/]
[crayon-60d0e6bb8caeb686557496/]
Another Route
[crayon-60d0e6bb8caed711039720/]
[crayon-60d0e6bb8caef630504179/]
TerminateMiddleware
[crayon-60d0e6bb8caf1454689194/]
#-> Changing Default NameSpace
[crayon-60d0e6bb8caf3456833746/]
#-> Controller
[crayon-60d0e6bb8caf5370715272/]
[crayon-60d0e6bb8caf6000300739/]
[crayon-60d0e6bb8caf8841758419/]
Consstruct
[crayon-60d0e6bb8cafa049396414/]
Controller Calls Middleware
[crayon-60d0e6bb8cafc308739027/]
#-> Path Route
[crayon-60d0e6bb8cafe136606219/]

GET /my index my.index
GET /my/create create my.create
POST /my store my.store
GET /my/{my} show my.show
GET /my/{my}/edit edit my.edit
PUT/PATCH /my/{my} update my.update
DELETE /my/{my} destroy my.destroy

# You Can Assign Interface   – Implicit Controller.
[crayon-60d0e6bb8cb00114963784/]
[crayon-60d0e6bb8cb02262801142/]
 

#->  URL Checking
[crayon-60d0e6bb8cb04015124182/]
[crayon-60d0e6bb8cb06644399267/]
[crayon-60d0e6bb8cb08606739492/]
[crayon-60d0e6bb8cb09847439746/]
#-> Post Registration
[crayon-60d0e6bb8cb0b580021006/]
 

#-> Response with cookie
[crayon-60d0e6bb8cb0d900548216/]
#->
[crayon-60d0e6bb8cb0f977883068/]
[crayon-60d0e6bb8cb11684159216/]
[crayon-60d0e6bb8cb13456702811/]
[crayon-60d0e6bb8cb15748143711/]
[crayon-60d0e6bb8cb17497488963/]
#-> ServiceProvider : Sharing data with all views.
[crayon-60d0e6bb8cb18259022205/]
# -> Using Blade : new View
[crayon-60d0e6bb8cb1a879300873/]
#-> welcome . blade.php
[crayon-60d0e6bb8cb1c963240409/]
#->
[crayon-60d0e6bb8cb1e220395171/]
#-> Error Logging
[crayon-60d0e6bb8cb21289230016/]
#-> Forms
[crayon-60d0e6bb8cb23171330936/]
#-> Localization
[crayon-60d0e6bb8cb25221485927/]
#-> Session
[crayon-60d0e6bb8cb27376813931/]
[crayon-60d0e6bb8cb29398532824/]
[crayon-60d0e6bb8cb2b518140746/]
[crayon-60d0e6bb8cb2c068764602/]
[crayon-60d0e6bb8cb2e020100094/]
#-> Validation Controller
[crayon-60d0e6bb8cb30642688787/]
[crayon-60d0e6bb8cb33961064799/]
#-> Mailer
[crayon-60d0e6bb8cb36987865107/]
#-> Ajax Controller
[crayon-60d0e6bb8cb38469239812/]
#Error Handling.

 

 

Reference:

  • https://mkdev.me/en/posts/top-5-php-frameworks-laravel-vs-yii-vs-zend-vs-phalcon-vs-symfony-their-good-and-bad-sides