PHP Laravel Framework'üne Dalış

3,547 views
3,190 views

Published on

Özgür Web Günleri 2013'de yaptığım sunum. Üzerinden geçtiğimiz örnek uygulama: https://github.com/emir/OWG2013-Sample-Laravel-App Video kaydının linki eklenecektir.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,547
On SlideShare
0
From Embeds
0
Number of Embeds
44
Actions
Shares
0
Downloads
38
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

PHP Laravel Framework'üne Dalış

  1. 1. PHP LARAVEL FRAMEWORK’ÜNE DALIŞ
  2. 2. Emir Karşıyakalı Developer at EFabrika ! ! ! github.com/emir twitter.com/emirkarsiyakali linkedin.com/in/emirkarsiyakali ! emirkarsiyakali@gmail.com
  3. 3. Neden Laravel? • Composer • Symfony components • Routing • Communtiy • ORM (MySQL, Postgres, SQL Server, SQLite) • Red, green, refactor! (PHPUnit) • Authentication • Cache, Events, Queues • Blade Templating • CLI
  4. 4. “Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching.” –Taylor Otwell
  5. 5. Nasıl öğrenebilirim? • Dökümantasyon, API • Laracasts • Leanpub
  6. 6. Kurulum PHP >= 5.3.7
 MCrypt PHP Extension
 
 composer create-project laravel/laravel
  7. 7. MVC?
  8. 8. Routing • Route to closures • Route to controllers • Route to RESTful controllers • Route to Resources
  9. 9. Routing
  10. 10. Route Grup, Filtreler
  11. 11. Route Model Binding
  12. 12. Artisan • Komutları görüntüleme
 php artisan list • Geliştirme ortamını çalıştırma
 php artisan serve • Etkileşimli kabuk
 php artisan tinker • Controller üretmek
 index, create, store, show, edit, update, destroy
 php artisan controller:make
  13. 13. Artisan • Migration oluşturmak
 php artisan migrate • Database seeding
 php artisan db:seed • Kuyruğu dinlemek
 php artisan queue:listen • Route list
 php artisan routes • 3rd party, sizin geliştirmeleriniz
 php artisan whatever the hell you want.

  14. 14. Jeffrey’s Generator • Migrations • Scaffolding • Models • Test • Views • Pivot Tables • Forms • Seeds • Resources https://github.com/JeffreyWay/Laravel-4-Generators
  15. 15. Controllers • Controller Filters • RESTful Controllers (getProfile, postProfile)
 Route::controller • Resource Controllers
  16. 16. Views & Responses • Basic Responses
 Returning strings • Redirects
 Redirect::to('user/login')->with('message', 'Login Failed’); • Views 
 View::make('greeting', array('name' => ‘Emir')); • Special Responses
 Response::json, Response::download,
  17. 17. Errors & Logging • debug 
 app/config/app.php
 default => true • HTTP Exceptions
 app:abort(‘code’, ‘message’); • Logging (debug, info, notice, warning, error, critical, and alert.)
 Log::info(‘Lorem ipsum dolor sit amet.’);
  18. 18. Database • Running Queries
 DB::select(‘select * from users where id = ?', array(1)); • Query Builder
 DB::table('users')->where('name', ‘John')->first();

  19. 19. …Eloquent class Post extends Eloquent { }
  20. 20. Eloquent
 Selecting Records
  21. 21. Eloquent
 Inserting Records
  22. 22. Eloquent
 Inserting Records
  23. 23. Eloquent
 Updating, Deleting Records
  24. 24. MongoDB? MongoLid
 • 
 class User extends MongoLid {
 protected $collection = 'users'; 
 }
 
 https://github.com/Zizaco/mongolid-laravel

  25. 25. Questions?
  26. 26. Koding https://koding.com/Apps/laravel-1 https://github.com/emir/Laravel.kdapp
  27. 27. Teşekkürler!

×