SlideShare a Scribd company logo
Toufiq MahmudTushar
Laravel Project Demonstration
Required Software
 .Net Framework - https://www.microsoft.com/en-us/download/details.aspx?id=52685
 Wamp/Xampp Server
 Composer - https://getcomposer.org/download/
 Php Editor
Installation
 Install .net framework, wamp, composer in a sequence order.
 Open cmd and type - composer
 Go to www/htdocs directory
 Open cmd and type - composer create-project laravel/laravel
myproject --prefer-dist
Note: laravel = package name and myproject = project name. this
command will create a laravel project on htdocs/www
directory.
 Open cmd and type - php artisan serve
Note: Start apache web server. Go to, http://localhost:8000
Project Structure
Project Structure
 app −This directory contains the core code of the application.
 bootstrap −This directory contains the application bootstrapping script.
 config −This directory contains configuration files of application.
 database −This folder contains your database migration and seeds.
 public −This is the application’s document root. It starts the Laravel
application. It also contains the assets of the application like JavaScript, CSS,
Images, etc.
 resources −This directory contains raw assets such as the LESS & Sass files,
localization and language files, andTemplates that are rendered as HTML.
 storage −This directory containsApp storage, like file uploads etc.
Framework storage (cache), and application-generated logs.
 test −This directory contains various test cases.
 vendor −This directory contains composer dependencies.
Routing
 For routing go to routes->web.php and configure request mapping.
 For view file creation, go to resources->views->test.blade.php
 Note: any change in view file not need to restart server but if any changes in
config/controller it may requires to restart the server.
 Sample Routing –
Route::get('user/register','UserController@preRegister');
Route::post('user/register',array('uses'=>'UserController@postRegister'));
DB Configuration
 After installing Laravel, the first thing need to do is to set the write permission
for the directory storage and bootstrap/cache.
chmod 775 /storage
chmod 775 /bootstrap/cache
 Create a database at phpmyadmin for your project.
 Open .env file from root directory and set DB properties.
 Go to config->database.php and set mysql DB properties.
 To create controller, open cmd and type - php artisan make:controller
UserController
Form Helper configuration
 Open cmd and type - composer require laravelcollective/html
 Then type - composer update
 Next, add your new provider to the providers array of config/app.php:
 'providers'=>[CollectiveHtmlHtmlServiceProvider::class,
],
 Finally, add two class aliases to the aliases array of config/app.php:
 'aliases'=>['Form'=>CollectiveHtmlFormFacade::class,
'Html'=>CollectiveHtmlHtmlFacade::class,
],
Eloquent ORM
 To generate database table from command line, go to database->migration
directory and then create class for database table with DML property.
 Table name should be like “users” if Model name “User”
 When classes are ready as database table, open cmd and type- php artisan
migrate
 Model Create command - php artisan make:model User
 Sample User Model Code –
protected $table = 'users';
protected $fillable = ['name','email','password'];
REST API
 To create Rest Controller, open cmd and type - php artisan make:controller --
resource RestUserController
 Add following line to routes->web.php
Sample routing - Route::resource('restUser','RestUserController');
References
 https://laravel.com/docs/5.4
 https://www.tutorialspoint.com/laravel/index.htm
 https://laracasts.com/series/laravel-5-fundamentals
 http://clickcoder.com/laravel-insert-update-delete-with-eloquent-orm/
 https://code.tutsplus.com/tutorials/using-illuminate-database-with-eloquent-
in-your-php-app-without-laravel--cms-27247
Source Code
 https://github.com/toufiqksl/LaravelCRUD
End

More Related Content

What's hot

Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel framework
Ahmad Fatoni
 
laravel.pptx
laravel.pptxlaravel.pptx
laravel.pptx
asif290119
 
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
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
Jonathan Goode
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
Viral Solani
 
Laravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansLaravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web Artisans
Windzoon Technologies
 
Projects In Laravel : Learn Laravel Building 10 Projects
Projects In Laravel : Learn Laravel Building 10 ProjectsProjects In Laravel : Learn Laravel Building 10 Projects
Projects In Laravel : Learn Laravel Building 10 Projects
Sam Dias
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
Max Claus Nunes
 
Laravel
LaravelLaravel
Laravel
tanveerkhan62
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
07.pallav
 
Lecture 2_ Intro to laravel.pptx
Lecture 2_ Intro to laravel.pptxLecture 2_ Intro to laravel.pptx
Lecture 2_ Intro to laravel.pptx
SaziaRahman
 
Html and css presentation
Html and css presentationHtml and css presentation
Html and css presentation
umesh patil
 
Laravel Eloquent ORM
Laravel Eloquent ORMLaravel Eloquent ORM
Laravel Eloquent ORM
Ba Thanh Huynh
 
PHP Workshop Notes
PHP Workshop NotesPHP Workshop Notes
PHP Workshop Notes
Pamela Fox
 
Hibernate presentation
Hibernate presentationHibernate presentation
Hibernate presentation
Manav Prasad
 
Javascript
JavascriptJavascript
Javascript
Mayank Bhatt
 
Php mysql ppt
Php mysql pptPhp mysql ppt
jQuery
jQueryjQuery
jQuery
Vishwa Mohan
 
Php
PhpPhp
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
Geshan Manandhar
 

What's hot (20)

Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel framework
 
laravel.pptx
laravel.pptxlaravel.pptx
laravel.pptx
 
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
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
 
Laravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansLaravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web Artisans
 
Projects In Laravel : Learn Laravel Building 10 Projects
Projects In Laravel : Learn Laravel Building 10 ProjectsProjects In Laravel : Learn Laravel Building 10 Projects
Projects In Laravel : Learn Laravel Building 10 Projects
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
Laravel
LaravelLaravel
Laravel
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Lecture 2_ Intro to laravel.pptx
Lecture 2_ Intro to laravel.pptxLecture 2_ Intro to laravel.pptx
Lecture 2_ Intro to laravel.pptx
 
Html and css presentation
Html and css presentationHtml and css presentation
Html and css presentation
 
Laravel Eloquent ORM
Laravel Eloquent ORMLaravel Eloquent ORM
Laravel Eloquent ORM
 
PHP Workshop Notes
PHP Workshop NotesPHP Workshop Notes
PHP Workshop Notes
 
Hibernate presentation
Hibernate presentationHibernate presentation
Hibernate presentation
 
Javascript
JavascriptJavascript
Javascript
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
jQuery
jQueryjQuery
jQuery
 
Php
PhpPhp
Php
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 

Similar to Laravel presentation

Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
Joseph's WebSphere Library
 
Laravel & Composer presentation - extended
Laravel & Composer presentation - extendedLaravel & Composer presentation - extended
Laravel & Composer presentation - extended
Cvetomir Denchev
 
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
 
RoR guide_p1
RoR guide_p1RoR guide_p1
RoR guide_p1
Brady Cheng
 
Laravel intake 37 all days
Laravel intake 37 all daysLaravel intake 37 all days
Laravel intake 37 all days
Ahmed Abd El Ftah
 
Apache
ApacheApache
Apache
Rathan Raj
 
Laravel & Composer presentation - WebHostFace
Laravel & Composer presentation - WebHostFace Laravel & Composer presentation - WebHostFace
Laravel & Composer presentation - WebHostFace
Cvetomir Denchev
 
Lampstack (1)
Lampstack (1)Lampstack (1)
Lampstack (1)
ShivamKumar773
 
Laravel 5
Laravel 5Laravel 5
Laravel 5
Sudip Simkhada
 
zLAMP
zLAMPzLAMP
Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02
arghya007
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
Chetan Soni
 
Laravel 5.3 - Web Development Php framework
Laravel 5.3 - Web Development Php frameworkLaravel 5.3 - Web Development Php framework
Laravel 5.3 - Web Development Php framework
Swapnil Tripathi ( Looking for new challenges )
 
How to Create and Load Model in Laravel
How to Create and Load Model in LaravelHow to Create and Load Model in Laravel
How to Create and Load Model in Laravel
Yogesh singh
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
Praveen Yadav
 
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
 
Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1
Alessandro Pilotti
 
Getting to know Laravel 5
Getting to know Laravel 5Getting to know Laravel 5
Getting to know Laravel 5
Bukhori Aqid
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravel
Confiz
 
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Adventures in Laravel 5 SunshinePHP 2016 TutorialAdventures in Laravel 5 SunshinePHP 2016 Tutorial
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Joe Ferguson
 

Similar to Laravel presentation (20)

Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
 
Laravel & Composer presentation - extended
Laravel & Composer presentation - extendedLaravel & Composer presentation - extended
Laravel & Composer presentation - extended
 
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
 
RoR guide_p1
RoR guide_p1RoR guide_p1
RoR guide_p1
 
Laravel intake 37 all days
Laravel intake 37 all daysLaravel intake 37 all days
Laravel intake 37 all days
 
Apache
ApacheApache
Apache
 
Laravel & Composer presentation - WebHostFace
Laravel & Composer presentation - WebHostFace Laravel & Composer presentation - WebHostFace
Laravel & Composer presentation - WebHostFace
 
Lampstack (1)
Lampstack (1)Lampstack (1)
Lampstack (1)
 
Laravel 5
Laravel 5Laravel 5
Laravel 5
 
zLAMP
zLAMPzLAMP
zLAMP
 
Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
 
Laravel 5.3 - Web Development Php framework
Laravel 5.3 - Web Development Php frameworkLaravel 5.3 - Web Development Php framework
Laravel 5.3 - Web Development Php framework
 
How to Create and Load Model in Laravel
How to Create and Load Model in LaravelHow to Create and Load Model in Laravel
How to Create and Load Model in Laravel
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
 
Laravel - Website Development in Php Framework.
Laravel - Website Development in Php Framework.Laravel - Website Development in Php Framework.
Laravel - Website Development in Php Framework.
 
Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1
 
Getting to know Laravel 5
Getting to know Laravel 5Getting to know Laravel 5
Getting to know Laravel 5
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravel
 
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Adventures in Laravel 5 SunshinePHP 2016 TutorialAdventures in Laravel 5 SunshinePHP 2016 Tutorial
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
 

Recently uploaded

Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
Eric D. Schabell
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 

Recently uploaded (20)

Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 

Laravel presentation

  • 2. Required Software  .Net Framework - https://www.microsoft.com/en-us/download/details.aspx?id=52685  Wamp/Xampp Server  Composer - https://getcomposer.org/download/  Php Editor
  • 3. Installation  Install .net framework, wamp, composer in a sequence order.  Open cmd and type - composer  Go to www/htdocs directory  Open cmd and type - composer create-project laravel/laravel myproject --prefer-dist Note: laravel = package name and myproject = project name. this command will create a laravel project on htdocs/www directory.  Open cmd and type - php artisan serve Note: Start apache web server. Go to, http://localhost:8000
  • 5. Project Structure  app −This directory contains the core code of the application.  bootstrap −This directory contains the application bootstrapping script.  config −This directory contains configuration files of application.  database −This folder contains your database migration and seeds.  public −This is the application’s document root. It starts the Laravel application. It also contains the assets of the application like JavaScript, CSS, Images, etc.  resources −This directory contains raw assets such as the LESS & Sass files, localization and language files, andTemplates that are rendered as HTML.  storage −This directory containsApp storage, like file uploads etc. Framework storage (cache), and application-generated logs.  test −This directory contains various test cases.  vendor −This directory contains composer dependencies.
  • 6. Routing  For routing go to routes->web.php and configure request mapping.  For view file creation, go to resources->views->test.blade.php  Note: any change in view file not need to restart server but if any changes in config/controller it may requires to restart the server.  Sample Routing – Route::get('user/register','UserController@preRegister'); Route::post('user/register',array('uses'=>'UserController@postRegister'));
  • 7. DB Configuration  After installing Laravel, the first thing need to do is to set the write permission for the directory storage and bootstrap/cache. chmod 775 /storage chmod 775 /bootstrap/cache  Create a database at phpmyadmin for your project.  Open .env file from root directory and set DB properties.  Go to config->database.php and set mysql DB properties.  To create controller, open cmd and type - php artisan make:controller UserController
  • 8. Form Helper configuration  Open cmd and type - composer require laravelcollective/html  Then type - composer update  Next, add your new provider to the providers array of config/app.php:  'providers'=>[CollectiveHtmlHtmlServiceProvider::class, ],  Finally, add two class aliases to the aliases array of config/app.php:  'aliases'=>['Form'=>CollectiveHtmlFormFacade::class, 'Html'=>CollectiveHtmlHtmlFacade::class, ],
  • 9. Eloquent ORM  To generate database table from command line, go to database->migration directory and then create class for database table with DML property.  Table name should be like “users” if Model name “User”  When classes are ready as database table, open cmd and type- php artisan migrate  Model Create command - php artisan make:model User  Sample User Model Code – protected $table = 'users'; protected $fillable = ['name','email','password'];
  • 10. REST API  To create Rest Controller, open cmd and type - php artisan make:controller -- resource RestUserController  Add following line to routes->web.php Sample routing - Route::resource('restUser','RestUserController');
  • 11. References  https://laravel.com/docs/5.4  https://www.tutorialspoint.com/laravel/index.htm  https://laracasts.com/series/laravel-5-fundamentals  http://clickcoder.com/laravel-insert-update-delete-with-eloquent-orm/  https://code.tutsplus.com/tutorials/using-illuminate-database-with-eloquent- in-your-php-app-without-laravel--cms-27247
  • 13. End