SlideShare a Scribd company logo
INTRODUCTION TO LARAVEL
By
Awulonu Obinna
ABOUT THE SPEAKER
Developer and Web Admin @ Headquarters Nigerian Airforce
Twitter – https://www.twitter.com/awulonu_obinna
Facebook – https://www.facebook.com/awulonuobinna
GitHub – https://www.github.com/obinosteve
#phpenthusiast #laravelevangelist
What is Laravel?
Laravel is a free, open-sourcePHP web framework, used for
development of web applications following the model-view
controller (MVC) architectural pattern.
What is a Framework?
A framework is a piece of code which dictates the architecture your
project will follow. Once you choose a framework to work with, you
have to follow the framework's code and design methodologies. The
framework will provide you with hooks and callbacks, so that
you build on it - it will then call your plugged-in code whenever it
wishes, a phenomenon called Inversion of Control.
What is mvc?
The Model-View-Controller (MVC) is an architectural pattern
that provides a reusable solution to resolve common problems
that occurs while developing a Web application. It separates an
application into three main logical components: the model, view
and controller.
Model:
The model is responsible for managing the data of the application. It
responds to the request from the view and it also responds to
instructions from the controller to update itself.
View:
The View component is used for all the UI logic of the application.
The view includes all the UI components such as text boxes,
dropdowns, buttons, etc. that the final user interacts with.
Controller:
Controller is responsible for controlling the application logic and acts as the
coordinator between the View and the Model. The Controller receives input from
users via the View, then process the user's data with the help of Model and passing
the results back to the View.
Benefits of the MVC Pattern
 Separation of concerns: Enables you to ensure that various application concerns
into different and independent software components. Thus, it allows you to work on a
single component independently.
 Simplified testing and maintenance: Enables you to test each component
independently.
 Extensibility: Enables the model to include a set of independent components that you
can easily modify or replace based on the application requirement.
 Faster development process
 Ability to provide multiple views
 SEO friendly Development platform: It is very easy to develop SEO-friendly URLs to
generate more visits from a specific application.
Architecture of a Laravel Application
Did we miss anything? Routing?
What is Routing in Laravel ?
Routing
Routing defines how the application will process and respond to
incoming HTTP request. You can use URLs that properly describes the
controller action to which the request needs to be routed.
Routing enables use of URLs that are descriptive of the user actions
and are more easily understood by the users.
e.g Instead of http://myapplication/Users.php?id=1
we can
http://myapplication/Users/1
Letz Get Started
Environment Setup
 Laravel Homestead https://laravel.com/docs/5.5/homestead
 Laragon https://laragon.org/
 Method 3:
 Wamp server: http://www.wampserver.com/en/
 Composer: https://getcomposer.org/download/
 Nodejs: https://nodejs.org/en/
 Npm: Installed on your computer when you install Node.js
Create new Laravel Project
 From your command prompt or terminal or git bash, run:
composer create-project --prefer-dist laravel/laravel projectname
 Run your first laravel application:
php artisan serve
CONGRATULATIONS
You have successfully ran your first laravel app
Laravel Directory Structure
 App Directory: Contains the core code of your application. A variety of
other directories will be generated inside the app directory as you use
the make Artisan commands to generate classes.
 Bootstrap Directory: Contains the app.php file which bootstraps the
framework.
 Config Directory: Contains all of your application's configuration files.
 Database Directory: Contains your database migration and seeds.
 Public Directory: Contains the index.php file, which is the entry point for
all requests entering your application and configures autoloading. This
directory also houses your assets such as images, JavaScript, and CSS.
 Resources Directory: Contains your views as well as your raw, un-compiled
assets such as LESS, SASS, or JavaScript.
 Routes Directory: Contains all of the route definitions for your application.
 Storage Directory: Contains your compiled Blade templates, file based
sessions, file caches, and other files generated by the framework.
 Tests Directory: Contains your automated tests.
 Vendor Directory: Contains your composer dependencies.
Default Laravel Technologies
The following technologies are included by default:
 Jquery: A cross-platform Js library designed to simplify the client-side scripting of
HTML.
 Bootstrap: Bootstrap is the most popular HTML, CSS, and Js framework for
developing responsive, mobile-first web sites
 Axios: A Js library used to make http requests from node.js or XMLHttpRequests
from the browser and it supports the Promise API that is native to JS ES6.
 Vue: Popular Js framework for building user interfaces.
 Lodash: A Js library that helps programmers write more concise and easier to
maintain Js.
 Cross-env: Run scripts that set and use environment variables across platforms
Letz Code
Laravel App Development Steps
 Verify that inside the .env file, APP_KEY is set and APP_DEBUG is set
to true
 Set the DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE,
DB_USERNAME and DB_PASSWORD correctly.
 Create and migrate your database migration
 Create the model
 Create the controller
 Create the route inside your route/web.php file
 Create the View
Say Hi to Eloquent ORM!
Eloquent ORM allow developers use Active Record pattern.
Active Record pattern is a technique of wrapping database into objects.
By using this technique, developers can present data stored in a
database table as class, and row as an object. Each database
table has a corresponding “Model” which is used to interact with that
table. It helps to make our codes look cleaner and readable. We can
use Eloquent ORM to create, edit, manipulate, query and delete entries
easily
Eloquent Model Methods
• Model::create(array('key' => 'value'));
• Model::update(array('key' => 'value'));
• Model::delete(1);
• Model::all();
• Model::find(1);
• // Trigger an exception
• Model::findOrFail(1);
• Model::where('foo', '=', 'bar')->get();
• Model::where('foo', '=', 'bar')->first();
• // Exception
• Model::where('foo', '=', 'bar')->firstOrFail();
• Model::where('foo', '=', 'bar')->count();
• Model::where('foo', '=', 'bar')->delete();
• Model::whereRaw('foo = bar and cars = 2', array(20))->get();
• Model::on('connection-name')->find(1);
• Model::with('relation')->get();
• Model::all()->take(10);
• Model::all()->skip(10)
Understanding Controllers
 Index: Display a listing of the resource.
 Create: Show the form for creating a new resource.
 Store: Store a newly created resource in the storage.
 Show: Display the specified resource.
 Edit: Show the form for editing the specified resource.
 Update: Update the specified resource in storage.
 Destroy: Delete the specified resource from storage.
Understanding Route Parameters
• Route::get('foo', function(){});
• Route::get('foo', 'ControllerName@function');
• Route::get('foo/{bar}', function($bar){});
• Route::get('foo/{bar}', 'ControllerName@function');
• Route::post('foo', function(){});
• Route::put('foo', function(){});
• Route::delete('foo', function(){});
RESTFUL ACTIONS
• Route::resource('foo', 'FooController');
QUESTIONS
??
THANKS

More Related Content

What's hot

Laravel
LaravelLaravel
Laravel
tanveerkhan62
 
laravel.pptx
laravel.pptxlaravel.pptx
laravel.pptx
asif290119
 
Laravel
LaravelLaravel
Laravel
Dyuti Islam
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
Mayank Panchal
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Dilouar Hossain
 
What-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxWhat-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptx
AbhijeetKumar456867
 
Laravel 101
Laravel 101Laravel 101
Laravel 101
Commit University
 
Laravel Introduction
Laravel IntroductionLaravel Introduction
Laravel Introduction
Ahmad Shah Hafizan Hamidin
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
Jonathan Goode
 
Laravel Presentation
Laravel PresentationLaravel Presentation
Laravel Presentation
REZAUL KARIM REFATH
 
Vue.js
Vue.jsVue.js
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
Prem Sanil
 
Express js
Express jsExpress js
Express js
Manav Prasad
 
Object Oriented Programming with Laravel - Session 1
Object Oriented Programming with Laravel - Session 1Object Oriented Programming with Laravel - Session 1
Object Oriented Programming with Laravel - Session 1
Shahrzad Peyman
 
Oracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web ServicesOracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
Jeff Smith
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
Dzmitry Naskou
 
Best practices for RESTful web service design
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service design
Ramin Orujov
 
API Development with Laravel
API Development with LaravelAPI Development with Laravel
API Development with Laravel
Michael Peacock
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
Edureka!
 
AngularJS
AngularJSAngularJS

What's hot (20)

Laravel
LaravelLaravel
Laravel
 
laravel.pptx
laravel.pptxlaravel.pptx
laravel.pptx
 
Laravel
LaravelLaravel
Laravel
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 
What-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxWhat-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptx
 
Laravel 101
Laravel 101Laravel 101
Laravel 101
 
Laravel Introduction
Laravel IntroductionLaravel Introduction
Laravel Introduction
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
 
Laravel Presentation
Laravel PresentationLaravel Presentation
Laravel Presentation
 
Vue.js
Vue.jsVue.js
Vue.js
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 
Express js
Express jsExpress js
Express js
 
Object Oriented Programming with Laravel - Session 1
Object Oriented Programming with Laravel - Session 1Object Oriented Programming with Laravel - Session 1
Object Oriented Programming with Laravel - Session 1
 
Oracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web ServicesOracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
 
Best practices for RESTful web service design
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service design
 
API Development with Laravel
API Development with LaravelAPI Development with Laravel
API Development with Laravel
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
 
AngularJS
AngularJSAngularJS
AngularJS
 

Similar to Laravel overview

Laravel - A Trending PHP Framework
Laravel - A Trending PHP FrameworkLaravel - A Trending PHP Framework
Laravel - A Trending PHP Framework
ijtsrd
 
Why Laravel is the first choice for Web development_.pdf
Why Laravel is the first choice for Web development_.pdfWhy Laravel is the first choice for Web development_.pdf
Why Laravel is the first choice for Web development_.pdf
Moon Technolabs Pvt. Ltd.
 
Laravel : A Fastest Growing Kid
Laravel : A Fastest Growing KidLaravel : A Fastest Growing Kid
Laravel : A Fastest Growing Kid
Endive Software
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
Sonia Simi
 
Web application development with laravel php framework version 4
Web application development with laravel php framework version 4Web application development with laravel php framework version 4
Web application development with laravel php framework version 4
Untung D Saptoto
 
Web presentation
Web presentationWeb presentation
Web presentation
Solaiman Hossain Tuhin
 
Latest Laravel Practice 2023 Experts Guidance.pdf
Latest Laravel Practice 2023 Experts Guidance.pdfLatest Laravel Practice 2023 Experts Guidance.pdf
Latest Laravel Practice 2023 Experts Guidance.pdf
Sufalam Technologies
 
13 Advantages of Using Laravel for Web Development.pdf
13 Advantages of Using Laravel for Web Development.pdf13 Advantages of Using Laravel for Web Development.pdf
13 Advantages of Using Laravel for Web Development.pdf
LorryThomas1
 
Laravel Web Development: A Comprehensive Guide
Laravel Web Development: A Comprehensive GuideLaravel Web Development: A Comprehensive Guide
Laravel Web Development: A Comprehensive Guide
deep9753ak
 
Why is Laravel the best framework for startups?
Why is Laravel the best framework for startups?Why is Laravel the best framework for startups?
Why is Laravel the best framework for startups?
Sterling Technolabs
 
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Lorvent56
 
Hidden things uncovered about laravel development
Hidden things uncovered about laravel developmentHidden things uncovered about laravel development
Hidden things uncovered about laravel development
Katy Slemon
 
Frequently Asked Questions About Laravel
Frequently Asked Questions About LaravelFrequently Asked Questions About Laravel
Frequently Asked Questions About Laravel
AResourcePool
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
ShaimaaMohamedGalal
 
laravel-interview-questions.pdf
laravel-interview-questions.pdflaravel-interview-questions.pdf
laravel-interview-questions.pdf
AnuragMourya8
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
Alessandro DS
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails Siddhesh
Siddhesh Bhobe
 
Laravel: Unleashing the power of PHP
Laravel: Unleashing the power  of PHPLaravel: Unleashing the power  of PHP
Laravel: Unleashing the power of PHP
Cetpa Infotech
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
IRJET Journal
 

Similar to Laravel overview (20)

Laravel - A Trending PHP Framework
Laravel - A Trending PHP FrameworkLaravel - A Trending PHP Framework
Laravel - A Trending PHP Framework
 
Why Laravel is the first choice for Web development_.pdf
Why Laravel is the first choice for Web development_.pdfWhy Laravel is the first choice for Web development_.pdf
Why Laravel is the first choice for Web development_.pdf
 
Laravel : A Fastest Growing Kid
Laravel : A Fastest Growing KidLaravel : A Fastest Growing Kid
Laravel : A Fastest Growing Kid
 
Ruby Rails Web Development
Ruby Rails Web DevelopmentRuby Rails Web Development
Ruby Rails Web Development
 
Web application development with laravel php framework version 4
Web application development with laravel php framework version 4Web application development with laravel php framework version 4
Web application development with laravel php framework version 4
 
cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)
 
Web presentation
Web presentationWeb presentation
Web presentation
 
Latest Laravel Practice 2023 Experts Guidance.pdf
Latest Laravel Practice 2023 Experts Guidance.pdfLatest Laravel Practice 2023 Experts Guidance.pdf
Latest Laravel Practice 2023 Experts Guidance.pdf
 
13 Advantages of Using Laravel for Web Development.pdf
13 Advantages of Using Laravel for Web Development.pdf13 Advantages of Using Laravel for Web Development.pdf
13 Advantages of Using Laravel for Web Development.pdf
 
Laravel Web Development: A Comprehensive Guide
Laravel Web Development: A Comprehensive GuideLaravel Web Development: A Comprehensive Guide
Laravel Web Development: A Comprehensive Guide
 
Why is Laravel the best framework for startups?
Why is Laravel the best framework for startups?Why is Laravel the best framework for startups?
Why is Laravel the best framework for startups?
 
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
 
Hidden things uncovered about laravel development
Hidden things uncovered about laravel developmentHidden things uncovered about laravel development
Hidden things uncovered about laravel development
 
Frequently Asked Questions About Laravel
Frequently Asked Questions About LaravelFrequently Asked Questions About Laravel
Frequently Asked Questions About Laravel
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
 
laravel-interview-questions.pdf
laravel-interview-questions.pdflaravel-interview-questions.pdf
laravel-interview-questions.pdf
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails Siddhesh
 
Laravel: Unleashing the power of PHP
Laravel: Unleashing the power  of PHPLaravel: Unleashing the power  of PHP
Laravel: Unleashing the power of PHP
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 

Recently uploaded

First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 

Recently uploaded (20)

First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 

Laravel overview

  • 2. ABOUT THE SPEAKER Developer and Web Admin @ Headquarters Nigerian Airforce Twitter – https://www.twitter.com/awulonu_obinna Facebook – https://www.facebook.com/awulonuobinna GitHub – https://www.github.com/obinosteve #phpenthusiast #laravelevangelist
  • 3. What is Laravel? Laravel is a free, open-sourcePHP web framework, used for development of web applications following the model-view controller (MVC) architectural pattern.
  • 4. What is a Framework? A framework is a piece of code which dictates the architecture your project will follow. Once you choose a framework to work with, you have to follow the framework's code and design methodologies. The framework will provide you with hooks and callbacks, so that you build on it - it will then call your plugged-in code whenever it wishes, a phenomenon called Inversion of Control.
  • 5. What is mvc? The Model-View-Controller (MVC) is an architectural pattern that provides a reusable solution to resolve common problems that occurs while developing a Web application. It separates an application into three main logical components: the model, view and controller.
  • 6. Model: The model is responsible for managing the data of the application. It responds to the request from the view and it also responds to instructions from the controller to update itself. View: The View component is used for all the UI logic of the application. The view includes all the UI components such as text boxes, dropdowns, buttons, etc. that the final user interacts with. Controller: Controller is responsible for controlling the application logic and acts as the coordinator between the View and the Model. The Controller receives input from users via the View, then process the user's data with the help of Model and passing the results back to the View.
  • 7. Benefits of the MVC Pattern  Separation of concerns: Enables you to ensure that various application concerns into different and independent software components. Thus, it allows you to work on a single component independently.  Simplified testing and maintenance: Enables you to test each component independently.  Extensibility: Enables the model to include a set of independent components that you can easily modify or replace based on the application requirement.  Faster development process  Ability to provide multiple views  SEO friendly Development platform: It is very easy to develop SEO-friendly URLs to generate more visits from a specific application.
  • 8. Architecture of a Laravel Application
  • 9. Did we miss anything? Routing? What is Routing in Laravel ?
  • 10. Routing Routing defines how the application will process and respond to incoming HTTP request. You can use URLs that properly describes the controller action to which the request needs to be routed. Routing enables use of URLs that are descriptive of the user actions and are more easily understood by the users. e.g Instead of http://myapplication/Users.php?id=1 we can http://myapplication/Users/1
  • 12. Environment Setup  Laravel Homestead https://laravel.com/docs/5.5/homestead  Laragon https://laragon.org/  Method 3:  Wamp server: http://www.wampserver.com/en/  Composer: https://getcomposer.org/download/  Nodejs: https://nodejs.org/en/  Npm: Installed on your computer when you install Node.js
  • 13. Create new Laravel Project  From your command prompt or terminal or git bash, run: composer create-project --prefer-dist laravel/laravel projectname  Run your first laravel application: php artisan serve CONGRATULATIONS You have successfully ran your first laravel app
  • 15.  App Directory: Contains the core code of your application. A variety of other directories will be generated inside the app directory as you use the make Artisan commands to generate classes.  Bootstrap Directory: Contains the app.php file which bootstraps the framework.  Config Directory: Contains all of your application's configuration files.  Database Directory: Contains your database migration and seeds.  Public Directory: Contains the index.php file, which is the entry point for all requests entering your application and configures autoloading. This directory also houses your assets such as images, JavaScript, and CSS.  Resources Directory: Contains your views as well as your raw, un-compiled assets such as LESS, SASS, or JavaScript.  Routes Directory: Contains all of the route definitions for your application.  Storage Directory: Contains your compiled Blade templates, file based sessions, file caches, and other files generated by the framework.  Tests Directory: Contains your automated tests.  Vendor Directory: Contains your composer dependencies.
  • 16. Default Laravel Technologies The following technologies are included by default:  Jquery: A cross-platform Js library designed to simplify the client-side scripting of HTML.  Bootstrap: Bootstrap is the most popular HTML, CSS, and Js framework for developing responsive, mobile-first web sites  Axios: A Js library used to make http requests from node.js or XMLHttpRequests from the browser and it supports the Promise API that is native to JS ES6.  Vue: Popular Js framework for building user interfaces.  Lodash: A Js library that helps programmers write more concise and easier to maintain Js.  Cross-env: Run scripts that set and use environment variables across platforms
  • 18. Laravel App Development Steps  Verify that inside the .env file, APP_KEY is set and APP_DEBUG is set to true  Set the DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD correctly.  Create and migrate your database migration  Create the model  Create the controller  Create the route inside your route/web.php file  Create the View
  • 19. Say Hi to Eloquent ORM! Eloquent ORM allow developers use Active Record pattern. Active Record pattern is a technique of wrapping database into objects. By using this technique, developers can present data stored in a database table as class, and row as an object. Each database table has a corresponding “Model” which is used to interact with that table. It helps to make our codes look cleaner and readable. We can use Eloquent ORM to create, edit, manipulate, query and delete entries easily
  • 20. Eloquent Model Methods • Model::create(array('key' => 'value')); • Model::update(array('key' => 'value')); • Model::delete(1); • Model::all(); • Model::find(1); • // Trigger an exception • Model::findOrFail(1); • Model::where('foo', '=', 'bar')->get(); • Model::where('foo', '=', 'bar')->first(); • // Exception • Model::where('foo', '=', 'bar')->firstOrFail(); • Model::where('foo', '=', 'bar')->count(); • Model::where('foo', '=', 'bar')->delete(); • Model::whereRaw('foo = bar and cars = 2', array(20))->get(); • Model::on('connection-name')->find(1); • Model::with('relation')->get(); • Model::all()->take(10); • Model::all()->skip(10)
  • 21. Understanding Controllers  Index: Display a listing of the resource.  Create: Show the form for creating a new resource.  Store: Store a newly created resource in the storage.  Show: Display the specified resource.  Edit: Show the form for editing the specified resource.  Update: Update the specified resource in storage.  Destroy: Delete the specified resource from storage.
  • 22. Understanding Route Parameters • Route::get('foo', function(){}); • Route::get('foo', 'ControllerName@function'); • Route::get('foo/{bar}', function($bar){}); • Route::get('foo/{bar}', 'ControllerName@function'); • Route::post('foo', function(){}); • Route::put('foo', function(){}); • Route::delete('foo', function(){}); RESTFUL ACTIONS • Route::resource('foo', 'FooController');