Introduction
Who am I?
• Simon Funk
• CEO and founder of Tree Stones web agency
• Passionate Webdeveloper and Laravel enthusiast
• Always interested for new technology and innovations
When I discovered Laravel
What is Laravel?
• PHP Framework for Artisans
• First release 2011
• Built on top of Symfony2 Components
• MVC based
• Like any framework, provides services and libraries to make interaction
with web requests and other services
Laravel Philosophy
• Love beatiful code
• Has expressive, elegant syntax
• Attempts to take the pain out of development (authentication, routing,
sessions, and caching)
• Providing powerful tools needed for large, robust applications
• Happy developers make the best code
Who is behind?
Taylor Otwell
Google Trend
The Installation
• Larave is based on Composer
• Installation via Laravel Installer
• Installation via Composer
Laravel folder structer
Controllers
Models
Views
The Basics
• Routing
• Controllers
• Templating (Blade)
• ORM (Eloquent)
Routing
• Handles the HTTP requests
• GET, POST, PUT, PATCH, DELETE
• Routes are defined in routes.php
• Routes can uses a closure
• Or you can use a Controller
Routing
Route List
• image
Controller
Blade
• Laravel default template engine
• Files need to use .blade.php extension
• Driven by inheritance and sections
• Extensible for adding new custom contol structures (directives)
Define a Blade Layout
Using a Blade Layout
Eloquent (ORM)
• Active Record
• Table – plural, snake_case class name
• Migrations
• Support relationship
• Soft deleting
• Timestamp
Migration & Seeder
• Migration • Seeder
Model
Artisan
• Laravel CLI, command «php artisan do:somtehing»
• Uses the Symfony Console component
• Manage table migrations, seed tables, create resourceful controllers
• Many more
Artisan
Service Container
• Manages class depencies
• Based on dependency injection method
• Dependencies are injected at run-time
• Allowing dependencies to be easily swapped
Service Container
Service Providers
• Act like component bootstrap
• Group related Service Container registrations in one place
• Can also run other functionalities like artisan command
Service Providers
Facades – What are they?
• Facade::doSomethingCool()
• Isn’t that a static method?
• Well, no
Facades – What are they?
• A «static» access to underlying service
• Lool like static resources, but actually uses services underneath
• Classes are resolved via Service Containers
Facades
• Laravel has a lot usefull usages of Facades like
• App::config()
• View::make()
• DB::table()
• Mail::send()
• Request::get()
• Session::get()
• Url::route()
• And much more…
Queue
• Provides a unified API across queue back-ends
• Interface to
• Amazon SQS
• IronMQ
• Redis queues
• Beanstalkd
• Sync – calls job inline
Middleware
• Allows processing or filtering of requests entering the system
• Example: Authentication, manipulation of content
Encryption
• Simplified encryption using mcrypt
• Available as Facade Crypt::(‘secret’)
Filesystem
• Abstraction layer to filesystem
• Local filesystem
• Amaron S3
• Rackspace Cloud Storage
• FTP/SFTP
• Dropbox
• Uses the league/flysystem library
Authentication
• Inlcudes libraries to do basic username/password authentication out
of the box
• Includes password recovery (Forgot password)
• Protecting routes using filters
Testing
• Testing Toolset
• Supports PHPUnit out of the box
• Easy to get started with Composer
• Allows you to simulate a web browser
• Support Mockery
Ecosystem
• Laravel
• Lumen
• Socialite
• Cashier
• Elixir
• Envoyer
• Spark (coming soon)
• Homestead
• Forge
Lumen
• Micor-framework for Micro-services
• Sacrifices configurability for speed
• Easy upgrade to a full Laravel application
Socialite
• Integrates Social authentication functionality
• Almost for all popular platforms available
• http://socialiteproviders.github.io
Cashier
• Billing without the hassle
• Subscription logic included
• Easy to setup
Envoy
• A simple deployment solution
• Handles SSH tasks
• Deploy on miltiple servers at onve
Elixir
• Gulp simplified
• Compilation, concatenation, minifaction, auto-prefixing,…
• Support for
• Source Maps
• CoffeScript
• Browserify
• Babel
• …
Spark (coming soon)
• Billing
• Team management
• Invitations
• Registration
• 2-factor auth
• …
Homestead
• Comes with everything you need
• Ubuntu
• PHP 5.6 & 7
• Nginx
• MySQL & Postgres
• Node
• Memcached
• …
Forge
• Automates the process to setup a server
• You don’t need to learn how to set up one
• Saves you the effort of settings everything up
• Globally, saves you ridiculous amounts of time
Envoyer (!= Envoy)
• Zero downtime deployments
• Seamless rollbacks
• Cronjobs monitoring with heartbeats
• Deployment health status
Community
• Slack http://larachat.co/
• Forum https://laracasts.com/discuss
• Forum http://laravel.io/forum
• Twitter https://twitter.com/laravelphp
• GitHub https://github.com/laravel/laravel
Conference
• LaraconUS July 27-29, Kentucky USA http://laracon.us/
• LaraconEU August 23-24, Amsterdam NL http://laracon.eu
Learning
• Laravel Documentation https://laravel.com/
• Laracasts https://laracasts.com/
CMS
• AsgardCMS https://asgardcms.com/
• OctoberCMS http://octobercms.com/
Thank you!
Questions?

Laravel introduction