Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Lesson1: Laravel

Content

Introduction Installation Basic

➢ What is Laravel? ❖ WampServer ✓ Directory Structure


➢ Version ❖ Composer
➢ អត្ថប្រយ ោជន៍ននការយប្រើ ❖ Node js ✓ Routing
ប្រាស់ Laravel
✓ Controller

✓ View

✓ Model
I. Introduction
➢ Laravel is a free open-source PHP framework
license with many contributors worldwide.
➢ រយ្កើត្យ ើ្យ ោ យ ោក Taylor Otwell.
➢ Laravel គឺជា PHP web application framework ៍ បី
ដ យប្រើប្រាស់ ំនាំ Model-View-Controller
architectural pattern (MVC) .
➢ The MVC pattern គឺជា ំនាំននការរយ្កើត្នូវ software
មួ ដ កនុ្យនោោះយគដរ្ដែកជា៣ ដននកគឺ model view
controller.
MVC Architecture Pattern in Laravel
Model
➢ យនៅកនុ្ Laravel model ំណា្ឲ្យ data និ្
Logic យនៅកនុ្ Application យនោោះ។
➢ វាមានត្ួនាទីសប្មារ់ទន
ំ ាក់ទំន្ជាមួួ database
យ ើមបីយ្វើនូវកិែក
ច ារមួ ែំនួន ូែជា រយ្កើត្ ទាញ ក
ដកដប្រ និ្ ុរទិននន័

Syntax: php artisan make:model (model’s Name)


View
➢ View ំណា្ឲ្យLayer យនៅកន្
ុ Application។
➢ យនៅកនុ្ Laravel view ប្ត្ូវរានរយ្កត្
ើ យ ោ យប្រើ
template engine មួ គឺ blade
Controller
➢ យនៅកនុ្ Laravel controller យ្វើការយនៅែយន្ោោះmodel
and view
➢ វាមានត្ួនាទីសប្មារ់ទួ Request ពី Client រនទារ់មក

យ្វើការត្ាមសំយណើរយនោោះ រួែរញ្ជូនទិននន័ ប្ត្ រ់យទៅ


វិញ (return a response)

Syntax: php artisan make:controller (NameController)


composer create-project laravel/laravel=4.1.27 your-project-name --prefer-dist

Laravel Version

composer create-project laravel/laravel=4.1.27 your-


project-name --prefer-dist
អត្ថប្រយ ោជន៍ននការយប្រើប្រាស់ Laravel

➢ Increased development speed


➢ Built-in authentication and authorization system
➢ Simplified error and exception handling
➢ Powerful Artisan CLI
➢ Excellent documentation and community support
➢ Scalability and performance optimization
➢ Cost-effective development
➢ Flexible and customizable
II. Installation
Please check the video
ដែកយែញជា២ដននក

❖ The Root Directory

❖ The App Directory


The Root Directory ❖ The resources Directory

❖ The app Directory ❖ The routes Directory

❖ The bootstrap Directory ❖ The storage Directory

❖ The config Directory ❖ The tests Directory

❖ The public Directory ❖ The vendor Directory


The App Directory ❖ The Listeners Directory

❖ The Broadcasting Directory ❖ The Mail Directory

❖ The console Directory ❖ The Models Directory

❖ The Events Directory ❖ The Notifications Directory

❖ The Exceptions Directory ❖ The Policises Directory

❖ The Http Directory ❖ The Provides Directory

❖ The Jobs Directory ❖ The Rules Directory


អត្ថប្រយ ោជន៍ននការយប្រើប្រាស់

➢ Increased development speed


➢ Built-in authentication and authorization system
➢ Simplified error and exception handling
➢ Powerful Artisan CLI
➢ Excellent documentation and community support
➢ Scalability and performance optimization
➢ Cost-effective development
➢ Flexible and customizable

You might also like