Laravel 02
Laravel 02
Laravel 02
==================
1. Prerequisite to learn laravel :-
------------------------------------
1. Prerequisite :-
--> To learn laravel, the user must be familiar with the following topics :-
a. PHP with OOPS Concepts
b. MVC Structure
c. MySQL
2. System Requirement :-
--> Before starting the laravel installation, users should be aware of the
following minimum system requirements :
a. PHP
b. MySQL
c. Composer
d. IDE (Integrated Development Envirnment)
e. Database GUI Tool.
===================================================================================
===================
2. Composer :-
---------------
1. What is Composer ?
'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cd
a447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt';
unlink('composer-setup.php'); } echo PHP_EOL;"
c. php composer-setup.php
d. php -r "unlink('composer-setup.php');"
Example :-
composer require spatie/laravel-pdf
composer require laravel/ui^2.1
===================================================================================
===================
3. Installation of Laravel :-
------------------------------
1. There are two ways to install laravel :-
a. Using Laravel Installer
1. Install Laravel :-
composer global require laravel/installer
2. Add composer to path to access laravel globally :-
export PATH="~/.config/composer/vendor/bin:$PATH"
b. Using Composer
composer create-project laravel/laravel example-app
===================================================================================
===================
4. Folder and File structure of Laravel :-
-------------------------------------------
1. app
a. console
Kernel.php --> Create a Custom Commands.
b. Exceptions
Handler.php
c. Http
Controllers
Middleware
Kernel.php -->Register the Middleware.
6. resources
a. css
b. js
c. lang
d. views
7. routes
a. api.php
b. channels.php
c. console.php
d. web.php
8. storage
a. app --> all pdf,excel file when we created inside here
b. framework
c. logs
9. tests
11. .env
===================================================================================
===================
5. Sample Laravel Application :-
--------------------------------
a. Define a View File Location :-
Location :- resources/views/<html_file>
Route::get('/', function () {
return view('welcome');
});