SlideShare a Scribd company logo
1
Getting started with
Laravel
Presenter :
Nikhil Agrawal
Mindfire Solutions
Date: 22nd April, 2014
2
Zend PHP 5.3 Certified
OCA-1z0-870 - MySQL 5 Certified
DELF-A1-French Certified
Skills: Laravel, cakePHP, Codeigniter, Mysql, Jquery, HTML,
css
About me
Presenter: Nikhil Agrawal, Mindfire Solutions
Connect Me:
https://www.facebook.com/nkhl.agrawal
http://in.linkedin.com/pub/nikhil-agrawal/33/318/21b/
https://twitter.com/NikhilAgrawal44
Contact Me:
Email: nikhila@mindfiresolutions.com, nikhil_agrawal@live.com
Skype: mfsi_nikhila
3
Content
✔ Introduction
✔ Features
✔ Setup
✔ Artisan CLI
✔ Routing
✔ Controller, Model, View (MVC)
✔ Installing packages
✔ Migration
✔ Error & Logging
✔ References & QA
Presenter: Nikhil Agrawal, Mindfire Solutions
4
Introduction
✔ Started by Taylor Otwell (a c# developer).
✔ PHP V>= 5.3 based MVC framework.
✔ Hugely inspired by other web framework including
frameworks in other language such as ROR,
ASP.NET and Sinatra
✔ Composer-based
✔ Has a command line interface called as Artisan
✔ Current stable version available is 4.1
Presenter: Nikhil Agrawal, Mindfire Solutions
5
Features out-of-the-box
✔ Flexible routing
✔ Powerful ActiveRecord ORM
✔ Migration and seeding
✔ Queue driver
✔ Cache driver
✔ Command-Line Utility (Artisan)
✔ Blade Template
✔ Authentication driver
✔ Pagination, Mail drivers, unit testing and many more
Presenter: Nikhil Agrawal, Mindfire Solutions
6
Setup
✔ Install Composer
curl -sS https://getcomposer.org/installer | php
✔ It is a dependency manager
✔ What problem it solves?
✔ composer.json, composer.lock files
✔ Install laravel / create-project.
✔ Folder structure
✔ Request lifecycle
✔ Configuration
Presenter: Nikhil Agrawal, Mindfire Solutions
7
Artisan
✔ Artisan is a command-line interface tool to speed up
development process
✔ Commands
✔ List all commands : php artisan list
✔ View help for a commands : php artisan help migrate
✔ Start PHP server : php artisan serve
✔ Interact with app : php artisan tinker
✔ View routes : php artisan routes
✔ And many more...
Presenter: Nikhil Agrawal, Mindfire Solutions
8
Routing
✔ Basic Get/Post route
✔ Route with parameter & https
✔ Route to controller action
Route::get('/test', function() {
return 'Hello'
})
Route::get('/test/{id}', array('https', function() {
return 'Hello'
}));
Route::get('/test/{id}', array(
'uses' => 'UsersController@login',
'as' => 'login'
)
)
Presenter: Nikhil Agrawal, Mindfire Solutions
9
Routing cont..
✔ Route group and prefixes
✔ Route Model binding
✔ Url of route:
✔ $url = route('routeName', $param);
✔ $url = action('ControllerName@method', $param)
Route::group(array('before' => 'auth|admin', 'prefix' => 'admin'), function (){
//Different routes
})
Binding a parameter to model
Route::model('user_id', 'User');
Route::get('user/profile/{user_id}', function(User $user){
return $user->firstname . ' ' . $user->lastname
})
Presenter: Nikhil Agrawal, Mindfire Solutions
10
Controller
✔ Extends BaseController, which can be used to write logic
common througout application
✔ RESTful controller
✔ Defining route
Route::controller('users', 'UserController');
✔ Methods name is prefixed with get/post HTTP verbs
✔ Resource controller
✔ Creating using artisan
✔ Register in routes
✔ Start using it
Presenter: Nikhil Agrawal, Mindfire Solutions
11
Model
✔ Model are used to interact with database.
✔ Each model corresponds to a table in db.
✔ Two different ways to write queries
1. Using Query Builder
2. Using Eloquent ORM
Presenter: Nikhil Agrawal, Mindfire Solutions
12
Query Builder (Model)
✔ SELECT
✔
$users = DB::table('users')->get();
✔ INSERT
✔ $id = DB::table('user')
->insertGetId(array('email' =>'nikhila@mindfire.com',
'password' => 'mindfire'));
✔ UPDATE
✔ DB::table('users')
->where('active', '=', 0)
->update(array('active' => 1));
✔ DELETE
✔ DB::table('users')
->delete();
Presenter: Nikhil Agrawal, Mindfire Solutions
13
Eloquent ORM (Model)
✔ Defining a Eloquent model
✔ Class User Extends Eloquent { }
✔ Try to keep the table name plural and the respective model as singular (e.g
users / User)
✔ SELECT
✔ $user = User::find(1) //Using Primary key
✔ $user = User::findorfail(1) //Throws ModelNotFoundException if
no data is found
✔ $user = Menu::where('group', '=', 'admin')->remember(10)->get();
//Caches Query for 10 minutes
✔ INSERT
✔ $user_obj = new User();
$user_obj->name = 'nikhil';
$user_obj->save();
✔ $user = User::create(array('name' => 'nikhil'));
14
Query Scope (Eloquent ORM)
✔ Allow re-use of logic in model.
Presenter: Nikhil Agrawal, Mindfire Solutions
15
Many others Eloquent features..
✔ Defining Relationships
✔ Soft deleting
✔ Mass Assignment
✔ Model events
✔ Model observer
✔ Eager loading
✔ Accessors & Mutators
16
View (Blade Template)
Presenter: Nikhil Agrawal, Mindfire Solutions
17
Loops
View Composer
✔ View composers are callbacks or class methods that are called when
a view is rendered.
✔ If you have data that you want bound to a given view each time that
view is rendered throughout your application, a view composer can
organize that code into a single location
View::composer('displayTags', function($view)
{
$view->with('tags', Tag::all());
});
Presenter: Nikhil Agrawal, Mindfire Solutions
18
Installing packages
✔ Installing a new package:
✔ composer require <packageName> (Press Enter)
✔ Give version information
✔ Using composer.json/composer.lock files
✔ composer install
✔ Some useful packages
✔ Sentry 2 for ACL implementation
✔ bllim/datatables for Datatables
✔ Way/Generators for speedup development process
✔ barryvdh/laravel-debugbar
✔ Check packagist.org for more list of packages
Presenter: Nikhil Agrawal, Mindfire Solutions
19
Migration
Developer A
✔ Generate migration class
✔ Run migration up
✔ Commits file
Developer B
✔ Pull changes from scm
✔ Run migration up
1. Install migration
✔ php artisan migrate install
2. Create migration using
✔ php artisan migrate:make name
3. Run migration
✔ php artisan migrate
4. Refresh, Reset, Rollback migration
Presenter: Nikhil Agrawal, Mindfire Solutions
Steps
20
Error & Logging
✔ Enable/Disable debug error in app/config/app.php
✔ Configure error log in app/start/global.php
✔ Use Daily based log file or on single log file
✔ Handle 404 Error
App::missing(function($exception){
return Response::view('errors.missing');
});
✔ Handling fatal error
App::fatal(function($exception){
return "Fatal Error";
});
✔ Generate HTTP exception using
App:abort(403);
✔ Logging error
✔ Log::warning('Somehting is going wrong'); //Info,error
21
References
● http://laravel.com/docs (Official Documentation)
● https://getcomposer.org/doc/00-intro.md (composer)
● https://laracasts.com/ (Video tutorials)
● http://cheats.jesse-obrien.ca/ (Cheat Sheet)
● http://taylorotwell.com/
Presenter: Nikhil Agrawal, Mindfire Solutions
22
Questions ??
Presenter: Nikhil Agrawal, Mindfire Solutions
23
A Big
Thank you !
Presenter: Nikhil Agrawal, Mindfire Solutions
24
Connect Us @
www.mindfiresolutions.com
https://www.facebook.com/MindfireSolutions
http://www.linkedin.com/company/mindfire-
solutions
http://twitter.com/mindfires

More Related Content

What's hot (18)

ODP
Gerrit JavaScript Plugins
Dariusz Łuksza
 
PDF
Let Grunt do the work, focus on the fun!
Dirk Ginader
 
PDF
第1回名古屋Grails/Groogy勉強会「Grailsを始めてみよう!」
Tsuyoshi Yamamoto
 
PPTX
JS performance tools
Dmytro Ovcharenko
 
PDF
jQuery plugin & testing with Jasmine
Miguel Parramón Teixidó
 
PDF
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Dirk Ginader
 
PDF
Introducing spring
Ernesto Hernández Rodríguez
 
PDF
Test Driven Infrastructure with Docker, Test Kitchen and Serverspec
Yury Tsarev
 
PPTX
Go Revel Gooo...
Dmytro Ovcharenko
 
PDF
Presentation security automation (Selenium Camp)
Artyom Rozumenko
 
KEY
Plack at OSCON 2010
Tatsuhiko Miyagawa
 
PPTX
Automated Deployments
Martin Etmajer
 
KEY
Tatsumaki
Tatsuhiko Miyagawa
 
PDF
Groovy in the Cloud
Daniel Woods
 
PPT
Continuos integration for iOS projects
Aleksandra Gavrilovska
 
PDF
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
KAI CHU CHUNG
 
PDF
Gearman work queue in php
Bo-Yi Wu
 
Gerrit JavaScript Plugins
Dariusz Łuksza
 
Let Grunt do the work, focus on the fun!
Dirk Ginader
 
第1回名古屋Grails/Groogy勉強会「Grailsを始めてみよう!」
Tsuyoshi Yamamoto
 
JS performance tools
Dmytro Ovcharenko
 
jQuery plugin & testing with Jasmine
Miguel Parramón Teixidó
 
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Dirk Ginader
 
Introducing spring
Ernesto Hernández Rodríguez
 
Test Driven Infrastructure with Docker, Test Kitchen and Serverspec
Yury Tsarev
 
Go Revel Gooo...
Dmytro Ovcharenko
 
Presentation security automation (Selenium Camp)
Artyom Rozumenko
 
Plack at OSCON 2010
Tatsuhiko Miyagawa
 
Automated Deployments
Martin Etmajer
 
Groovy in the Cloud
Daniel Woods
 
Continuos integration for iOS projects
Aleksandra Gavrilovska
 
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
KAI CHU CHUNG
 
Gearman work queue in php
Bo-Yi Wu
 

Similar to Getting started-with-laravel (20)

PDF
SF Grails - Ratpack - Compact Groovy Webapps - James Williams
Philip Stehlik
 
PDF
Pyramid Deployment and Maintenance
Jazkarta, Inc.
 
PDF
Panmind at Ruby Social Club Milano
Panmind
 
PDF
Let's build Developer Portal with Backstage
Opsta
 
PDF
How to Webpack your Django!
David Gibbons
 
PPTX
Kubernetes walkthrough
Sangwon Lee
 
PDF
What's New In Laravel 5
Darren Craig
 
PPTX
Ahmadabad mule soft_meetup_6march2021_azure_CICD
Shekh Muenuddeen
 
PDF
Catalyst patterns-yapc-eu-2016
John Napiorkowski
 
PDF
What the heck went wrong?
Andy McKay
 
PDF
Go swagger tutorial how to create golang api documentation using go swagger (1)
Katy Slemon
 
PDF
Sprint 71
ManageIQ
 
PPTX
Working with AngularJS
André Vala
 
ODP
Pyramid patterns
Carlos de la Guardia
 
PDF
Services Drupalcamp Stockholm 2009
hugowetterberg
 
PDF
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
cgmonroe
 
PPTX
OpenStack Rally presentation by RamaK
Rama Krishna B
 
PPTX
New features of Minimal APIs in .NET 7 -Muralidharan Deenathayalan.pptx
Muralidharan Deenathayalan
 
PPTX
Front end development with Angular JS
Bipin
 
ODP
Pyramid deployment
Carlos de la Guardia
 
SF Grails - Ratpack - Compact Groovy Webapps - James Williams
Philip Stehlik
 
Pyramid Deployment and Maintenance
Jazkarta, Inc.
 
Panmind at Ruby Social Club Milano
Panmind
 
Let's build Developer Portal with Backstage
Opsta
 
How to Webpack your Django!
David Gibbons
 
Kubernetes walkthrough
Sangwon Lee
 
What's New In Laravel 5
Darren Craig
 
Ahmadabad mule soft_meetup_6march2021_azure_CICD
Shekh Muenuddeen
 
Catalyst patterns-yapc-eu-2016
John Napiorkowski
 
What the heck went wrong?
Andy McKay
 
Go swagger tutorial how to create golang api documentation using go swagger (1)
Katy Slemon
 
Sprint 71
ManageIQ
 
Working with AngularJS
André Vala
 
Pyramid patterns
Carlos de la Guardia
 
Services Drupalcamp Stockholm 2009
hugowetterberg
 
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
cgmonroe
 
OpenStack Rally presentation by RamaK
Rama Krishna B
 
New features of Minimal APIs in .NET 7 -Muralidharan Deenathayalan.pptx
Muralidharan Deenathayalan
 
Front end development with Angular JS
Bipin
 
Pyramid deployment
Carlos de la Guardia
 
Ad

Recently uploaded (20)

PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Ad

Getting started-with-laravel

  • 1. 1 Getting started with Laravel Presenter : Nikhil Agrawal Mindfire Solutions Date: 22nd April, 2014
  • 2. 2 Zend PHP 5.3 Certified OCA-1z0-870 - MySQL 5 Certified DELF-A1-French Certified Skills: Laravel, cakePHP, Codeigniter, Mysql, Jquery, HTML, css About me Presenter: Nikhil Agrawal, Mindfire Solutions Connect Me: https://www.facebook.com/nkhl.agrawal http://in.linkedin.com/pub/nikhil-agrawal/33/318/21b/ https://twitter.com/NikhilAgrawal44 Contact Me: Email: [email protected], [email protected] Skype: mfsi_nikhila
  • 3. 3 Content ✔ Introduction ✔ Features ✔ Setup ✔ Artisan CLI ✔ Routing ✔ Controller, Model, View (MVC) ✔ Installing packages ✔ Migration ✔ Error & Logging ✔ References & QA Presenter: Nikhil Agrawal, Mindfire Solutions
  • 4. 4 Introduction ✔ Started by Taylor Otwell (a c# developer). ✔ PHP V>= 5.3 based MVC framework. ✔ Hugely inspired by other web framework including frameworks in other language such as ROR, ASP.NET and Sinatra ✔ Composer-based ✔ Has a command line interface called as Artisan ✔ Current stable version available is 4.1 Presenter: Nikhil Agrawal, Mindfire Solutions
  • 5. 5 Features out-of-the-box ✔ Flexible routing ✔ Powerful ActiveRecord ORM ✔ Migration and seeding ✔ Queue driver ✔ Cache driver ✔ Command-Line Utility (Artisan) ✔ Blade Template ✔ Authentication driver ✔ Pagination, Mail drivers, unit testing and many more Presenter: Nikhil Agrawal, Mindfire Solutions
  • 6. 6 Setup ✔ Install Composer curl -sS https://getcomposer.org/installer | php ✔ It is a dependency manager ✔ What problem it solves? ✔ composer.json, composer.lock files ✔ Install laravel / create-project. ✔ Folder structure ✔ Request lifecycle ✔ Configuration Presenter: Nikhil Agrawal, Mindfire Solutions
  • 7. 7 Artisan ✔ Artisan is a command-line interface tool to speed up development process ✔ Commands ✔ List all commands : php artisan list ✔ View help for a commands : php artisan help migrate ✔ Start PHP server : php artisan serve ✔ Interact with app : php artisan tinker ✔ View routes : php artisan routes ✔ And many more... Presenter: Nikhil Agrawal, Mindfire Solutions
  • 8. 8 Routing ✔ Basic Get/Post route ✔ Route with parameter & https ✔ Route to controller action Route::get('/test', function() { return 'Hello' }) Route::get('/test/{id}', array('https', function() { return 'Hello' })); Route::get('/test/{id}', array( 'uses' => 'UsersController@login', 'as' => 'login' ) ) Presenter: Nikhil Agrawal, Mindfire Solutions
  • 9. 9 Routing cont.. ✔ Route group and prefixes ✔ Route Model binding ✔ Url of route: ✔ $url = route('routeName', $param); ✔ $url = action('ControllerName@method', $param) Route::group(array('before' => 'auth|admin', 'prefix' => 'admin'), function (){ //Different routes }) Binding a parameter to model Route::model('user_id', 'User'); Route::get('user/profile/{user_id}', function(User $user){ return $user->firstname . ' ' . $user->lastname }) Presenter: Nikhil Agrawal, Mindfire Solutions
  • 10. 10 Controller ✔ Extends BaseController, which can be used to write logic common througout application ✔ RESTful controller ✔ Defining route Route::controller('users', 'UserController'); ✔ Methods name is prefixed with get/post HTTP verbs ✔ Resource controller ✔ Creating using artisan ✔ Register in routes ✔ Start using it Presenter: Nikhil Agrawal, Mindfire Solutions
  • 11. 11 Model ✔ Model are used to interact with database. ✔ Each model corresponds to a table in db. ✔ Two different ways to write queries 1. Using Query Builder 2. Using Eloquent ORM Presenter: Nikhil Agrawal, Mindfire Solutions
  • 12. 12 Query Builder (Model) ✔ SELECT ✔ $users = DB::table('users')->get(); ✔ INSERT ✔ $id = DB::table('user') ->insertGetId(array('email' =>'[email protected]', 'password' => 'mindfire')); ✔ UPDATE ✔ DB::table('users') ->where('active', '=', 0) ->update(array('active' => 1)); ✔ DELETE ✔ DB::table('users') ->delete(); Presenter: Nikhil Agrawal, Mindfire Solutions
  • 13. 13 Eloquent ORM (Model) ✔ Defining a Eloquent model ✔ Class User Extends Eloquent { } ✔ Try to keep the table name plural and the respective model as singular (e.g users / User) ✔ SELECT ✔ $user = User::find(1) //Using Primary key ✔ $user = User::findorfail(1) //Throws ModelNotFoundException if no data is found ✔ $user = Menu::where('group', '=', 'admin')->remember(10)->get(); //Caches Query for 10 minutes ✔ INSERT ✔ $user_obj = new User(); $user_obj->name = 'nikhil'; $user_obj->save(); ✔ $user = User::create(array('name' => 'nikhil'));
  • 14. 14 Query Scope (Eloquent ORM) ✔ Allow re-use of logic in model. Presenter: Nikhil Agrawal, Mindfire Solutions
  • 15. 15 Many others Eloquent features.. ✔ Defining Relationships ✔ Soft deleting ✔ Mass Assignment ✔ Model events ✔ Model observer ✔ Eager loading ✔ Accessors & Mutators
  • 16. 16 View (Blade Template) Presenter: Nikhil Agrawal, Mindfire Solutions
  • 17. 17 Loops View Composer ✔ View composers are callbacks or class methods that are called when a view is rendered. ✔ If you have data that you want bound to a given view each time that view is rendered throughout your application, a view composer can organize that code into a single location View::composer('displayTags', function($view) { $view->with('tags', Tag::all()); }); Presenter: Nikhil Agrawal, Mindfire Solutions
  • 18. 18 Installing packages ✔ Installing a new package: ✔ composer require <packageName> (Press Enter) ✔ Give version information ✔ Using composer.json/composer.lock files ✔ composer install ✔ Some useful packages ✔ Sentry 2 for ACL implementation ✔ bllim/datatables for Datatables ✔ Way/Generators for speedup development process ✔ barryvdh/laravel-debugbar ✔ Check packagist.org for more list of packages Presenter: Nikhil Agrawal, Mindfire Solutions
  • 19. 19 Migration Developer A ✔ Generate migration class ✔ Run migration up ✔ Commits file Developer B ✔ Pull changes from scm ✔ Run migration up 1. Install migration ✔ php artisan migrate install 2. Create migration using ✔ php artisan migrate:make name 3. Run migration ✔ php artisan migrate 4. Refresh, Reset, Rollback migration Presenter: Nikhil Agrawal, Mindfire Solutions Steps
  • 20. 20 Error & Logging ✔ Enable/Disable debug error in app/config/app.php ✔ Configure error log in app/start/global.php ✔ Use Daily based log file or on single log file ✔ Handle 404 Error App::missing(function($exception){ return Response::view('errors.missing'); }); ✔ Handling fatal error App::fatal(function($exception){ return "Fatal Error"; }); ✔ Generate HTTP exception using App:abort(403); ✔ Logging error ✔ Log::warning('Somehting is going wrong'); //Info,error
  • 21. 21 References ● http://laravel.com/docs (Official Documentation) ● https://getcomposer.org/doc/00-intro.md (composer) ● https://laracasts.com/ (Video tutorials) ● http://cheats.jesse-obrien.ca/ (Cheat Sheet) ● http://taylorotwell.com/ Presenter: Nikhil Agrawal, Mindfire Solutions
  • 22. 22 Questions ?? Presenter: Nikhil Agrawal, Mindfire Solutions
  • 23. 23 A Big Thank you ! Presenter: Nikhil Agrawal, Mindfire Solutions