introduction to laravel
DESCRIPTION
Introduction to Laravel. The PHP Framework for Web Artisans. Laravel is a free, open source PHP web application framework, designed for the development of MVC web applications. Laravel is released under the MIT license, with its source code hosted on GitHub.TRANSCRIPT
![Page 2: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/2.jpg)
NOTICE
THIS IS NOT A FRAMEWORK WAR
![Page 3: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/3.jpg)
The Usual About Me
• Self-taught HTML in 1997 (1st Book bought on MV Doulos)• Founded WebEvolution Resources in 2001• Decade in Sales (Banking & Pharmaceutical)• Founded yourfoodreview.com in 2010• Founded Green Room in 2013• Really into PHP after meeting other half
![Page 4: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/4.jpg)
Back to Laravel• Before there were light, there was CodeIgniter.
• CodeIgniter is probably the most popular framework back then, known for it’s ultra lightweight and simple learning curve.
• In 2011, Taylor Otwell the creator of Laravel decided that some essential functionalities are missing in CodeIgniter, like out-of-the-box authentication, closure routing & etc.
• Laravel 4 was released on May 2013, rewritten from ground up. It is now one of the, if not, the most powerful PHP framework. With advance functionality such as DB seeding, built-in mailer, blade templating and an even more powerful Eloquent ORM.
Love history? http://maxoffsky.com/code-blog/history-of-laravel-php-framework-eloquence-emerging
![Page 5: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/5.jpg)
Let’s Get Dirty
composer create-project laravel/laravel webcamppg
Quick Start
Creating project ‘webcamppg’ with composer
![Page 6: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/6.jpg)
Directory Structure
• public/ is everything accessible externally• app/ is your playground• app/controllers is the home of your controller • app/models is the home of your models• app/views is the home of your views
![Page 7: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/7.jpg)
Blade Templating
<?php $name = “Vin Lim”;
?>
@if (isset($name))Welcome {{$name}},
@elseWelcome Stranger
@endif
Echo Data
Echo PHP variable with If .. Else conditioning
![Page 8: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/8.jpg)
RESTful Routing
Route::get('/hello’ , function() { return 'Hello World';
});
Route::get(’/name/{name}’ , ’HomeController@showWelcome');
Route::post(’/’ , ’HomeController@showWelcome');
Echo Data
Echo PHP variable with If .. Else conditioning
![Page 9: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/9.jpg)
Requests & Input
public function showWelcome() {if (Input::has('name')) {
data[‘name’] = Input::get(‘name’);return View::make('hello')->with(‘data’,$data);
} else {return View::make('hello’);
}}
Basic Input
Check & retrieve an input value
![Page 10: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/10.jpg)
Other Resources
Laravel: Code BrightWeb application development for the Laravel framework version 4 for beginners.
Laravel DocumentationOfficial Documentation – laravel.com/docs/
![Page 11: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/11.jpg)
Oh and of course…
Stack Overflowwww.stackoverflow.com
![Page 12: Introduction to Laravel](https://reader034.vdocuments.net/reader034/viewer/2022052122/554a0ea6b4c9055c598b4907/html5/thumbnails/12.jpg)
THANK YOUA special thank to Laravel core team and it’s awesome commnity
for making our life, so much better.
github.com/laravel/laravel