Laravel – Tutorial

PHP OOP

 *  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-662b5f4b1a8f2745671321/]
#-> 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-662b5f4b1a8fb124188463/]
[crayon-662b5f4b1a8fe556380953/]
[crayon-662b5f4b1a900648983545/]
RoleMiddleware
[crayon-662b5f4b1a902096730238/]
[crayon-662b5f4b1a904209944887/]
Another Route
[crayon-662b5f4b1a906357777417/]
[crayon-662b5f4b1a908458402611/]
TerminateMiddleware
[crayon-662b5f4b1a90a296982526/]
#-> Changing Default NameSpace
[crayon-662b5f4b1a90c726073892/]
#-> Controller
[crayon-662b5f4b1a90e915185097/]
[crayon-662b5f4b1a910480351553/]
[crayon-662b5f4b1a912480245728/]
Consstruct
[crayon-662b5f4b1a914338537802/]
Controller Calls Middleware
[crayon-662b5f4b1a916391007082/]
#-> Path Route
[crayon-662b5f4b1a918400841613/]

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-662b5f4b1a91a403500121/]
[crayon-662b5f4b1a91c786684974/]
 

#->  URL Checking
[crayon-662b5f4b1a91e805610295/]
[crayon-662b5f4b1a920335301771/]
[crayon-662b5f4b1a922260990561/]
[crayon-662b5f4b1a924951550887/]
#-> Post Registration
[crayon-662b5f4b1a931249541179/]
 

#-> Response with cookie
[crayon-662b5f4b1a934881308690/]
#->
[crayon-662b5f4b1a936147790260/]
[crayon-662b5f4b1a938346084344/]
[crayon-662b5f4b1a93a669599584/]
[crayon-662b5f4b1a93c208331875/]
[crayon-662b5f4b1a93f318531913/]
#-> ServiceProvider : Sharing data with all views.
[crayon-662b5f4b1a941194138883/]
# -> Using Blade : new View
[crayon-662b5f4b1a944401427071/]
#-> welcome . blade.php
[crayon-662b5f4b1a946147315918/]
#->
[crayon-662b5f4b1a948625373441/]
#-> Error Logging
[crayon-662b5f4b1a94b673744817/]
#-> Forms
[crayon-662b5f4b1a94d847235106/]
#-> Localization
[crayon-662b5f4b1a94f747558167/]
#-> Session
[crayon-662b5f4b1a952742266441/]
[crayon-662b5f4b1a953333075216/]
[crayon-662b5f4b1a955980113586/]
[crayon-662b5f4b1a957607144077/]
[crayon-662b5f4b1a959284159728/]
#-> Validation Controller
[crayon-662b5f4b1a95b510629977/]
[crayon-662b5f4b1a95e417537561/]
#-> Mailer
[crayon-662b5f4b1a960475481256/]
#-> Ajax Controller
[crayon-662b5f4b1a963735173331/]
#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