Pablo Chiappetti
@p4bloch
LARAVEL
An introduction to its magic
Ninja Developer @Bikestorming
Full Stack Nerd
Argentinian
Boca Juniors Fan
Introduction for PHP developers
If you like it, then go read the docs
How Laravel solves common problems
VERSIONS 4 & 5
RELEASES EVERY 6 MONTHS
LONG TERM SUPPORT
EMBRACES THE COMMUNITY
Laravel's own vagrant box
Installation & Project Structure
Laravel's CLI tool
Filter every request entering your app.
php artisan make:middleware TestMiddlewareSee: Laracasts Generators
php artisan make:migration create_posts_tableVersion control for your database
php artisan migrate
php artisan migrate:rollback
php artisan migrate:resetphp artisan make:model PostLaravel's Active Record ORM
php artisan make:seeder PostSeederRun the seeder
php artisan db:seed$factory->define(App\User::class, function (Faker\Generator $faker) {
return [
'name' => $faker->name,
'email' => $faker->email,
'password' => bcrypt(str_random(10)),
'remember_token' => str_random(10),
];
});$user = factory(App\User::class)->make();
$users = factory(App\User::class, 3)->make();Integration with Beanstalkd, IronMQ,
Amazon SQS and Redis
php artisan make:job SendConfirmationEmail --queuedHow to use it
Event::fire(new PostWasPublished($post));Observer implementation
Event
Listener
Listener
Listener
// PostWasPublished.php
class PostWasPublished extends Event implements ShouldBroadcast {
public $post;
public function broadcastOn()
{
return ['posts'];
}
}Websockets implementation out of the box
// main.js
socket.on('posts:PostWasPublished', function(message){
console.log(message.user);
});PHPUnit support out of the box
Mocking
Factories
DatabaseTransactions trait
DatabaseMigrations trait
public function testPhotoCanBeUploaded()
{
$this->visit('/upload')
->name('File Name', 'name')
->attach($absolutePathToFile, 'photo')
->press('Upload')
->see('Upload Successful!');
}Blade Template Engine
Caching
Envoy
Localization
Form Requests
Flysystem included
Elixir
Lumen (micro framework)
Forge (server management)
Laracasts.com
Laracon Youtube Channel
Laravel.io