SlideShare a Scribd company logo
1 of 26
1 Author : Vikas Chauhan
Presented By:
Vikas Chauhan
Software Engineer,
BrainCoerce Technologies, Bangalore
Date – 08/08/2013
2
 Exercise 1 :- Installation and configuration
 Exercise 2 :- Write Hello World Program
 Exercise 3 :- Laravel Blade
 Exercise 4 :- Laravel Blade & Layout
 Exercise 5:- Types of Route
Author : Vikas Chauhan
3
Exercise 1
Installation and configuration
Author : Vikas Chauhan
4
Task 1 :- Install Composer.
- Go to http://getcomposer.org/ and download.
Author : Vikas Chauhan
5
Task 2 :- Install & configure Laravel
 Via Composer Create-Project :- Using commend composer create-
project laravel/laravel [directory]
(see:- http://www.youtube.com/watch?v=DD_-
l5AZY1A&feature=youtu.be )
 Using commend install composer ( see:-
http://www.youtube.com/watch?v=WW1CPLOzRH4&feature=youtu.be
)
 Generate key :- using commend php artisan key:generate (see :-
http://www.youtube.com/watch?v=87bYRrzCSUw&feature=youtu.be )
 Copy that unique generate key and paste into ‘app/config/app.php
file.
 Rename ‘server.php’ to ‘index.php’ .
Author : Vikas Chauhan
6
Task 3 :- Run Laravel
 Enter the url http://localhost/laravellab/public/ on
browser. (url should be change according to your localhost path.)
Author : Vikas Chauhan
7
Exercise 2
Write Hello World
Author : Vikas Chauhan
8
Task 1 :- Create welcome controller
 Using commend php artisan controller:make WelcomeController
(see :-
http://www.youtube.com/watch?v=BeIiGERN1tc&feature=youtu.
be )
Author : Vikas Chauhan
9
Task 2 :- Create welcome action
See:- https://gist.github.com/leonguyen/6000768
Author : Vikas Chauhan
10
Task 3 :- Routing Welcome Controller
See:- https://gist.github.com/leonguyen/6000930
Author : Vikas Chauhan
11
Task 4 :- Run
 Enter URL http://localhost/laravellab/index.php/welcome on the
browser .
Author : Vikas Chauhan
12
Exercise 3
Laravel Blade
Author : Vikas Chauhan
13
Task 1 :- app -> Controller -> DemoController
<?php class DemoController extends BaseController
{
public $restful = true;
public function get_index()
{
$title = ‘laravel page';
$View= View::make('demo1.index' , array(
'name'=>laravel user',
'age'=>'28',
'location'=>'bangalore'))
->with('title',$title);
return $View;
}
}
Author : Vikas Chauhan
14
Task 2 :- app ->View -> demo1 -> index.blade.php
<h1>My first controller</h1>
@if(isset($name))
{{ $age }} <br/>
@else
{{ $name }} <br/>
@endif
{{ $age }} <br/>
{{ $location }} <br/>
Author : Vikas Chauhan
15
Task 3 :- app-> route.php
Route::controller('demo1','DemoController');
Task 5 :- Run
Enter URL http://localhost/laravellab/index.php/demo1 on the
browser
Author : Vikas Chauhan
16
Exercise 4
Laravel Blade Layout
Author : Vikas Chauhan
17
Task 1 :- app -> Controller -> DemoController
<?php class DemoController extends BaseController
{
public $restful = true;
public $layout = 'layout.default';
public function get_index()
{
$this->layout->title = laravelpage';
$View= View::make('demo1.index' , array(
'name'=>Laravel user',
'age'=>'28',
'location'=>'bangalore'));
$this->layout->content= $View;
}
}
Author : Vikas Chauhan
18
Task 2 :- app ->View -> demo1 -> index.blade.php
<h1>My first controller</h1>
@if(isset($name))
{{ $age }} <br/>
@else
{{ $name }} <br/>
@endif
{{ $age }} <br/>
{{ $location }} <br/>
Author : Vikas Chauhan
19
Task 3 :- app ->View -> demo1 -> index.blade.php
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ $title }}</title>
</head>
<body>
{{ $content }}
</body>
</html>
Author : Vikas Chauhan
20
Task 4 :- app-> route.php
Route::controller('demo1','DemoController');
Task 5 :- Run
Enter URL http://localhost/laravellab/index.php/demo1 on the browser
Author : Vikas Chauhan
21
Exercise 5
Types of Route
Author : Vikas Chauhan
22
Echo by route:- route.php
Route::get (‘about’, function() {
return “hello world”;
});
Echo by view:-
in view folder create a php file named hello
route.php :-
Route::get (‘/’, function() {
return view::make(‘hello’);
});
Author : Vikas Chauhan
23
Echo by only controller:-
route.php :-
Route::resource(‘demo1’, ‘controllername);
In controller
<?php class DemoController extends BaseController
{
public function get_index()
{
echo ‘hello world’;
}
}
Author : Vikas Chauhan
24
Echo by controller and view:-
route.php :-
Route::controller(‘demo1’, ‘controllername);
In controller :-
<?php class DemoController extends BaseController
{
public function get_index()
{
$View= View::make('demo1.index' , array(
'name'=>’laravel user ‘ )) ;
return $View;
}
}
In view :- create a folder named demo1 and make a php fiile named
index.php
Author : Vikas Chauhan
25
Restful route:-
route.php :-
Route::controller(‘pathname’, ‘controllername@function_name’);
In controller :-
<?php class DemoController extends BaseController
{
public function get_index()
{
$View= View::make('demo1.index' , array(
'name'=>’laravel User ‘ )) ;
return $View;
}
}
In view :- create a folder named demo1 and make a php fiile named
index.php
Author : Vikas Chauhan
26
Thanks & Regards,
Contact to – Vikas Chauhan
Email ID – vikas.chauhan@braincoerce.com
Phone – (080) 41155974

More Related Content

What's hot

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
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data BindingDuy Khanh
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorialRohit Gupta
 
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.pptxAbhijeetKumar456867
 
JDBC Java Database Connectivity
JDBC Java Database ConnectivityJDBC Java Database Connectivity
JDBC Java Database ConnectivityRanjan Kumar
 
Angular 8
Angular 8 Angular 8
Angular 8 Sunil OS
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel frameworkAhmad Fatoni
 
Asp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkAsp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkShravan A
 
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 4Untung D Saptoto
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentationivpol
 
Angular - Chapter 5 - Directives
 Angular - Chapter 5 - Directives Angular - Chapter 5 - Directives
Angular - Chapter 5 - DirectivesWebStackAcademy
 
NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA  NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA Pramendra Gupta
 

What's hot (20)

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...
 
Laravel Presentation
Laravel PresentationLaravel Presentation
Laravel Presentation
 
Laravel Introduction
Laravel IntroductionLaravel Introduction
Laravel Introduction
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
 
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
 
JDBC Java Database Connectivity
JDBC Java Database ConnectivityJDBC Java Database Connectivity
JDBC Java Database Connectivity
 
Angular 8
Angular 8 Angular 8
Angular 8
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel framework
 
Asp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkAsp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity Framework
 
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
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
 
Angular - Chapter 5 - Directives
 Angular - Chapter 5 - Directives Angular - Chapter 5 - Directives
Angular - Chapter 5 - Directives
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
 
Angular introduction students
Angular introduction studentsAngular introduction students
Angular introduction students
 
Angular
AngularAngular
Angular
 
NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA  NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 

Viewers also liked

Php internal architecture
Php internal architecturePhp internal architecture
Php internal architectureElizabeth Smith
 
PHP 7 performances from PHP 5
PHP 7 performances from PHP 5PHP 7 performances from PHP 5
PHP 7 performances from PHP 5julien pauli
 
PHP Optimization
PHP OptimizationPHP Optimization
PHP Optimizationdjesch
 
Internet of Things With PHP
Internet of Things With PHPInternet of Things With PHP
Internet of Things With PHPAdam Englander
 
PHP, Under The Hood - DPC
PHP, Under The Hood - DPCPHP, Under The Hood - DPC
PHP, Under The Hood - DPCAnthony Ferrara
 
Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)David de Boer
 
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
[Community Open Camp] 給 PHP 開發者的 VS Code 指南[Community Open Camp] 給 PHP 開發者的 VS Code 指南
[Community Open Camp] 給 PHP 開發者的 VS Code 指南Shengyou Fan
 
How PHP Works ?
How PHP Works ?How PHP Works ?
How PHP Works ?Ravi Raj
 
LaravelConf Taiwan 2017 開幕
LaravelConf Taiwan 2017 開幕LaravelConf Taiwan 2017 開幕
LaravelConf Taiwan 2017 開幕Shengyou Fan
 
Route 路由控制
Route 路由控制Route 路由控制
Route 路由控制Shengyou Fan
 

Viewers also liked (14)

Php internal architecture
Php internal architecturePhp internal architecture
Php internal architecture
 
PHP 7 performances from PHP 5
PHP 7 performances from PHP 5PHP 7 performances from PHP 5
PHP 7 performances from PHP 5
 
PHP Optimization
PHP OptimizationPHP Optimization
PHP Optimization
 
Internet of Things With PHP
Internet of Things With PHPInternet of Things With PHP
Internet of Things With PHP
 
PHP, Under The Hood - DPC
PHP, Under The Hood - DPCPHP, Under The Hood - DPC
PHP, Under The Hood - DPC
 
PHP WTF
PHP WTFPHP WTF
PHP WTF
 
PHP 7 new engine
PHP 7 new enginePHP 7 new engine
PHP 7 new engine
 
Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)
 
Php
PhpPhp
Php
 
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
[Community Open Camp] 給 PHP 開發者的 VS Code 指南[Community Open Camp] 給 PHP 開發者的 VS Code 指南
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
 
How PHP Works ?
How PHP Works ?How PHP Works ?
How PHP Works ?
 
Php 101: PDO
Php 101: PDOPhp 101: PDO
Php 101: PDO
 
LaravelConf Taiwan 2017 開幕
LaravelConf Taiwan 2017 開幕LaravelConf Taiwan 2017 開幕
LaravelConf Taiwan 2017 開幕
 
Route 路由控制
Route 路由控制Route 路由控制
Route 路由控制
 

Similar to Laravel Beginners Tutorial 1

App development with quasar (pdf)
App development with quasar (pdf)App development with quasar (pdf)
App development with quasar (pdf)wonyong hwang
 
Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Vikas Chauhan
 
Laravel - Website Development in Php Framework.
Laravel - Website Development in Php Framework.Laravel - Website Development in Php Framework.
Laravel - Website Development in Php Framework.SWAAM Tech
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php PresentationAlan Pinstein
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5Darren Craig
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用Shengyou Fan
 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 Joe Ferguson
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalDrupalDay
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaPantheon
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Stéphane Bégaudeau
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel ApplicationAfrimadoni Dinata
 
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみたネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみたfurusin
 
Getting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGetting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGirish Bapat
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundryrajdeep
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 

Similar to Laravel Beginners Tutorial 1 (20)

App development with quasar (pdf)
App development with quasar (pdf)App development with quasar (pdf)
App development with quasar (pdf)
 
Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2
 
Laravel - Website Development in Php Framework.
Laravel - Website Development in Php Framework.Laravel - Website Development in Php Framework.
Laravel - Website Development in Php Framework.
 
Workshop Laravel 5.2
Workshop Laravel 5.2Workshop Laravel 5.2
Workshop Laravel 5.2
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用
 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Maven
MavenMaven
Maven
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon Vienna
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014
 
Javascript laravel's friend
Javascript laravel's friendJavascript laravel's friend
Javascript laravel's friend
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel Application
 
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみたネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
 
Getting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGetting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydb
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 

Recently uploaded

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Laravel Beginners Tutorial 1

  • 1. 1 Author : Vikas Chauhan Presented By: Vikas Chauhan Software Engineer, BrainCoerce Technologies, Bangalore Date – 08/08/2013
  • 2. 2  Exercise 1 :- Installation and configuration  Exercise 2 :- Write Hello World Program  Exercise 3 :- Laravel Blade  Exercise 4 :- Laravel Blade & Layout  Exercise 5:- Types of Route Author : Vikas Chauhan
  • 3. 3 Exercise 1 Installation and configuration Author : Vikas Chauhan
  • 4. 4 Task 1 :- Install Composer. - Go to http://getcomposer.org/ and download. Author : Vikas Chauhan
  • 5. 5 Task 2 :- Install & configure Laravel  Via Composer Create-Project :- Using commend composer create- project laravel/laravel [directory] (see:- http://www.youtube.com/watch?v=DD_- l5AZY1A&feature=youtu.be )  Using commend install composer ( see:- http://www.youtube.com/watch?v=WW1CPLOzRH4&feature=youtu.be )  Generate key :- using commend php artisan key:generate (see :- http://www.youtube.com/watch?v=87bYRrzCSUw&feature=youtu.be )  Copy that unique generate key and paste into ‘app/config/app.php file.  Rename ‘server.php’ to ‘index.php’ . Author : Vikas Chauhan
  • 6. 6 Task 3 :- Run Laravel  Enter the url http://localhost/laravellab/public/ on browser. (url should be change according to your localhost path.) Author : Vikas Chauhan
  • 7. 7 Exercise 2 Write Hello World Author : Vikas Chauhan
  • 8. 8 Task 1 :- Create welcome controller  Using commend php artisan controller:make WelcomeController (see :- http://www.youtube.com/watch?v=BeIiGERN1tc&feature=youtu. be ) Author : Vikas Chauhan
  • 9. 9 Task 2 :- Create welcome action See:- https://gist.github.com/leonguyen/6000768 Author : Vikas Chauhan
  • 10. 10 Task 3 :- Routing Welcome Controller See:- https://gist.github.com/leonguyen/6000930 Author : Vikas Chauhan
  • 11. 11 Task 4 :- Run  Enter URL http://localhost/laravellab/index.php/welcome on the browser . Author : Vikas Chauhan
  • 13. 13 Task 1 :- app -> Controller -> DemoController <?php class DemoController extends BaseController { public $restful = true; public function get_index() { $title = ‘laravel page'; $View= View::make('demo1.index' , array( 'name'=>laravel user', 'age'=>'28', 'location'=>'bangalore')) ->with('title',$title); return $View; } } Author : Vikas Chauhan
  • 14. 14 Task 2 :- app ->View -> demo1 -> index.blade.php <h1>My first controller</h1> @if(isset($name)) {{ $age }} <br/> @else {{ $name }} <br/> @endif {{ $age }} <br/> {{ $location }} <br/> Author : Vikas Chauhan
  • 15. 15 Task 3 :- app-> route.php Route::controller('demo1','DemoController'); Task 5 :- Run Enter URL http://localhost/laravellab/index.php/demo1 on the browser Author : Vikas Chauhan
  • 16. 16 Exercise 4 Laravel Blade Layout Author : Vikas Chauhan
  • 17. 17 Task 1 :- app -> Controller -> DemoController <?php class DemoController extends BaseController { public $restful = true; public $layout = 'layout.default'; public function get_index() { $this->layout->title = laravelpage'; $View= View::make('demo1.index' , array( 'name'=>Laravel user', 'age'=>'28', 'location'=>'bangalore')); $this->layout->content= $View; } } Author : Vikas Chauhan
  • 18. 18 Task 2 :- app ->View -> demo1 -> index.blade.php <h1>My first controller</h1> @if(isset($name)) {{ $age }} <br/> @else {{ $name }} <br/> @endif {{ $age }} <br/> {{ $location }} <br/> Author : Vikas Chauhan
  • 19. 19 Task 3 :- app ->View -> demo1 -> index.blade.php <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>{{ $title }}</title> </head> <body> {{ $content }} </body> </html> Author : Vikas Chauhan
  • 20. 20 Task 4 :- app-> route.php Route::controller('demo1','DemoController'); Task 5 :- Run Enter URL http://localhost/laravellab/index.php/demo1 on the browser Author : Vikas Chauhan
  • 21. 21 Exercise 5 Types of Route Author : Vikas Chauhan
  • 22. 22 Echo by route:- route.php Route::get (‘about’, function() { return “hello world”; }); Echo by view:- in view folder create a php file named hello route.php :- Route::get (‘/’, function() { return view::make(‘hello’); }); Author : Vikas Chauhan
  • 23. 23 Echo by only controller:- route.php :- Route::resource(‘demo1’, ‘controllername); In controller <?php class DemoController extends BaseController { public function get_index() { echo ‘hello world’; } } Author : Vikas Chauhan
  • 24. 24 Echo by controller and view:- route.php :- Route::controller(‘demo1’, ‘controllername); In controller :- <?php class DemoController extends BaseController { public function get_index() { $View= View::make('demo1.index' , array( 'name'=>’laravel user ‘ )) ; return $View; } } In view :- create a folder named demo1 and make a php fiile named index.php Author : Vikas Chauhan
  • 25. 25 Restful route:- route.php :- Route::controller(‘pathname’, ‘controllername@function_name’); In controller :- <?php class DemoController extends BaseController { public function get_index() { $View= View::make('demo1.index' , array( 'name'=>’laravel User ‘ )) ; return $View; } } In view :- create a folder named demo1 and make a php fiile named index.php Author : Vikas Chauhan
  • 26. 26 Thanks & Regards, Contact to – Vikas Chauhan Email ID – vikas.chauhan@braincoerce.com Phone – (080) 41155974

Editor's Notes

  1. ‘layout’is a folder in view and ‘default’ is file in ‘layout’ folder.