SlideShare a Scribd company logo
Evolve with Laravel
-Gayan Sanjeewa
What you’ll learn:
● Must know features and components.
● Standards and recommendations.
● Initialize an app from fresh.
● Glimpse of unit testing.
Choose your ground.
Choose your ground.
● Why Laravel? what the community says
○ https://laravel-news.com/2016-survey
● Is it perform well? let's ask from Taylor Otwell
○ https://medium.com/@taylorotwell/benchmarking-laravel-symfony-zend-2c01c2b270f8
● RAD
● Small to mid to enterprise level
● Lumen for Micro-services
Choose your ground.
● Env
○ Lamp/Homestead/Valet/Docker
● Editor
○ Phpstorm/sublime
○ Postman for api testing
Install
Install
● Latest version is Laravel 5.4
● Laravel 5.5 is going to be the new LTS version, which is in final stage of
development.
● Install Using Laravel Installer
○ composer global require "laravel/installer"
○ laravel new --dev api.acme
● Install Via composer create-project
○ composer create-project laravel/laravel api.acme dev-develop
Structure
● Artisan - laravel cli
● .env vs .env.example
● .gitignore
● composer.json Vs composer.lock
● composer install Vs composer update
● public/Index.php
● config/app.php
● http/Kernal.php & console/Kernal.php
● phpunit.yml
● storage/log/laravel.log
● Use git right from start!
● Always use PSR! (http://www.php-fig.org/psr)
PSR?
PSR?
● There's only two types of programmers.
● PSR recommends the second type ;)
● Set Up in phpstorm
TDD?
TDD?
TDD process
Let build an App
Scope,
"In Acme Corp,
a user can create many products.
A product can have many tags and vise versa.
When the product is created, a confirmation email should be
sent to the user."
Demo project
Download from
https://github.com/gayansanjeewa/api.acme.git
Convention Over Configuration
● Introduced by David Heinemeier Hansson
to describe the philosophy of the Ruby on
Rails web framework.
● Applies to any framework.
● Ex: If there is a class “Category” in the
model, the corresponding table in the
database is called "categories" by default.
● It is only if one deviates from this
convention, such as the table
"product_categories", that one needs to
write code regarding these names.
Database
● Table name: plural, snake_case
○ Users
○ products
○ tags
● Column name: singular, snake_case
○ email
○ product_id
● Pivot table name: singular, snake_case, alphabetically
ordered
○ product_tag
○ post_user
● In Route/Controller/Model or use Repository/Service or use Module?
● Why Migration and seeds needed?
● How to validate requests?
● Why Event-Listeners and when to use domain events.
● How to trigger Email properly?
● Why and when middleware
○ Ex: trim, null string. Auth
● Keep things SOLID!
Where should my code go?
We’ll also look at,
● Eloquent
● Collections
● Builder
● Eager loading - Products per users
● $user->products() vs $user->products
● Facade
● Jwt
● cache, queue, cron, command
Q&A
Rest is up
to you!
Thanks!

More Related Content

PDF
Drupal and contribution (2010 - 2011 / 2)
PDF
Appium testing
PPTX
WordPress Local Environments VVV
PDF
Agile Systems Admin
PDF
Force Academy LA Trigger Framework
PDF
140 releases per month
PPTX
Protractor
PPTX
Lets cook cucumber !!
Drupal and contribution (2010 - 2011 / 2)
Appium testing
WordPress Local Environments VVV
Agile Systems Admin
Force Academy LA Trigger Framework
140 releases per month
Protractor
Lets cook cucumber !!

What's hot (20)

PPTX
Progressive Web App Testing With Cypress.io
PDF
Yet Another Continuous Integration Story
PPTX
Основы нагрузочного тестирования с инструментом Jmeter
PDF
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
PDF
Civilized Git Process
PPTX
Branching Strategies For Git and Subversion
PDF
Angular Libraries & NPM
PPTX
Building large and scalable mission critical applications with React
PPTX
I am hooked on React
PDF
WordPress Plugins (WordCamp Utah)
PDF
Fast end-to-end-tests
PPTX
Building reliable applications with React, C#, and Azure
PDF
QA 4 python
PPTX
Testing of React JS app
PDF
Extreme Programming - to the next-level
PDF
Release & Iterate Faster: Stop Manual Testing
PDF
Automated Performance Testing
PPTX
What can possibly go wrong if i dont e2 e test my packages?
PDF
Benchmarking MongoDB for Fame and Fortune
ODP
OpenNTF Essentials
Progressive Web App Testing With Cypress.io
Yet Another Continuous Integration Story
Основы нагрузочного тестирования с инструментом Jmeter
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Civilized Git Process
Branching Strategies For Git and Subversion
Angular Libraries & NPM
Building large and scalable mission critical applications with React
I am hooked on React
WordPress Plugins (WordCamp Utah)
Fast end-to-end-tests
Building reliable applications with React, C#, and Azure
QA 4 python
Testing of React JS app
Extreme Programming - to the next-level
Release & Iterate Faster: Stop Manual Testing
Automated Performance Testing
What can possibly go wrong if i dont e2 e test my packages?
Benchmarking MongoDB for Fame and Fortune
OpenNTF Essentials
Ad

Similar to Evolve with laravel (20)

PDF
Tips and Tricks for Testing Lambda Expressions in Android
PPTX
Serverless - DevOps Lessons Learned From Production
PPTX
How to establish ways of working that allows shifting-left of the automation ...
PDF
How fast can you onboard a new team member with VAGRANT ?
PPTX
Automated Acceptance Tests & Tool choice
PDF
Integration testing - A&BP CC
PPTX
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
PDF
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
PDF
Laravel vs. node.js war for the backend
PDF
DDD with Behat
PPTX
Flask and Introduction to web frameworks
PDF
Best practices for JavaScript RIAs
PDF
Why and how to develop OpenERP test scenarios (in python and using OERPScenar...
PDF
Top 10 Best Free Laravel Hosting Providers in 2025
PDF
LCE13: Test and Validation Summit: The future of testing at Linaro
PDF
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
PDF
PyCon Korea - Real World Graphene
PDF
JSFest 2019: Technology agnostic microservices at SPA frontend
PDF
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
PDF
Releaseflow: a healthy build and deploy process
Tips and Tricks for Testing Lambda Expressions in Android
Serverless - DevOps Lessons Learned From Production
How to establish ways of working that allows shifting-left of the automation ...
How fast can you onboard a new team member with VAGRANT ?
Automated Acceptance Tests & Tool choice
Integration testing - A&BP CC
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
Laravel vs. node.js war for the backend
DDD with Behat
Flask and Introduction to web frameworks
Best practices for JavaScript RIAs
Why and how to develop OpenERP test scenarios (in python and using OERPScenar...
Top 10 Best Free Laravel Hosting Providers in 2025
LCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
PyCon Korea - Real World Graphene
JSFest 2019: Technology agnostic microservices at SPA frontend
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Releaseflow: a healthy build and deploy process
Ad

Recently uploaded (20)

PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
assetexplorer- product-overview - presentation
PPTX
Trending Python Topics for Data Visualization in 2025
PDF
Types of Token_ From Utility to Security.pdf
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Time Tracking Features That Teams and Organizations Actually Need
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PPTX
Patient Appointment Booking in Odoo with online payment
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Complete Guide to Website Development in Malaysia for SMEs
PPTX
Cybersecurity: Protecting the Digital World
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
STL Containers in C++ : Sequence Container : Vector
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Autodesk AutoCAD Crack Free Download 2025
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Why Generative AI is the Future of Content, Code & Creativity?
assetexplorer- product-overview - presentation
Trending Python Topics for Data Visualization in 2025
Types of Token_ From Utility to Security.pdf
Advanced SystemCare Ultimate Crack + Portable (2025)
Time Tracking Features That Teams and Organizations Actually Need
wealthsignaloriginal-com-DS-text-... (1).pdf
DNT Brochure 2025 – ISV Solutions @ D365
Patient Appointment Booking in Odoo with online payment
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Complete Guide to Website Development in Malaysia for SMEs
Cybersecurity: Protecting the Digital World
Monitoring Stack: Grafana, Loki & Promtail
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
STL Containers in C++ : Sequence Container : Vector
iTop VPN Crack Latest Version Full Key 2025
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025

Evolve with laravel

  • 2. What you’ll learn: ● Must know features and components. ● Standards and recommendations. ● Initialize an app from fresh. ● Glimpse of unit testing.
  • 4. Choose your ground. ● Why Laravel? what the community says ○ https://laravel-news.com/2016-survey ● Is it perform well? let's ask from Taylor Otwell ○ https://medium.com/@taylorotwell/benchmarking-laravel-symfony-zend-2c01c2b270f8 ● RAD ● Small to mid to enterprise level ● Lumen for Micro-services
  • 5. Choose your ground. ● Env ○ Lamp/Homestead/Valet/Docker ● Editor ○ Phpstorm/sublime ○ Postman for api testing
  • 7. Install ● Latest version is Laravel 5.4 ● Laravel 5.5 is going to be the new LTS version, which is in final stage of development. ● Install Using Laravel Installer ○ composer global require "laravel/installer" ○ laravel new --dev api.acme ● Install Via composer create-project ○ composer create-project laravel/laravel api.acme dev-develop
  • 8. Structure ● Artisan - laravel cli ● .env vs .env.example ● .gitignore ● composer.json Vs composer.lock ● composer install Vs composer update ● public/Index.php ● config/app.php ● http/Kernal.php & console/Kernal.php ● phpunit.yml ● storage/log/laravel.log ● Use git right from start! ● Always use PSR! (http://www.php-fig.org/psr)
  • 10. PSR? ● There's only two types of programmers. ● PSR recommends the second type ;) ● Set Up in phpstorm
  • 11. TDD?
  • 12. TDD?
  • 15. Scope, "In Acme Corp, a user can create many products. A product can have many tags and vise versa. When the product is created, a confirmation email should be sent to the user."
  • 17. Convention Over Configuration ● Introduced by David Heinemeier Hansson to describe the philosophy of the Ruby on Rails web framework. ● Applies to any framework. ● Ex: If there is a class “Category” in the model, the corresponding table in the database is called "categories" by default. ● It is only if one deviates from this convention, such as the table "product_categories", that one needs to write code regarding these names.
  • 18. Database ● Table name: plural, snake_case ○ Users ○ products ○ tags ● Column name: singular, snake_case ○ email ○ product_id ● Pivot table name: singular, snake_case, alphabetically ordered ○ product_tag ○ post_user
  • 19. ● In Route/Controller/Model or use Repository/Service or use Module? ● Why Migration and seeds needed? ● How to validate requests? ● Why Event-Listeners and when to use domain events. ● How to trigger Email properly? ● Why and when middleware ○ Ex: trim, null string. Auth ● Keep things SOLID! Where should my code go?
  • 20. We’ll also look at, ● Eloquent ● Collections ● Builder ● Eager loading - Products per users ● $user->products() vs $user->products ● Facade ● Jwt ● cache, queue, cron, command
  • 21. Q&A

Editor's Notes

  • #14: Unit test Acceptance test/ feature test Php unit framework
  • #16: I’m creating this sample app Explain Different components of Laravel and best practices.
  • #19: Ex users and posts -> post_user
  • #20: Always a best practice to create a domain folder and put the code inside I’m going to use the approach we use in Clouddecor That is create a domain folder And create separate modules