Advance Web PPT
Ecommerce Front-end
18094198-082
18094198-100
18094198-101
Create a laravel project
Run command :
“composer create-project laravel/laravel frontend”
Then change directory with command :
“cd frontend”
Run command to start the project:
“php artisan serve”
Add tailwindcss file
Add tailwindcss minified file in public folder
Create layout for nav and footer
Create files in resource/views/layout folder
Nav:
Nav contains a logo and shop name on the left side
On the right side 2 icons and 2 buttons
 Icon for profile and cart
 Buttons for login and signup
The body tag is started in nav
Fotter:
Social media icon and copyright
Body tag is closed here so every blade view which imports nav and footer can
access app.css too.
All blade views will include the nav at start and footer at the end
@include('layouts.nav')
// blade view content
@include('layouts.footer')
Create components
Run command:
“php artisan make:component checkoutimg”
This creates a component in views/component folder and a class in app/views
In class of the component add the variables
public $img;
public $title;
public $price;
public $desc;
Initialize them in constructor
public function
__construct($img,$title,$price,$desc)
{
$this->img = $img;
$this->title = $title;
$this->price = $price;
$this->desc = $desc;
}
Each variable is used ad “{{$title}}”
Repeat this process to create “Homeimg” and “Similarproducts” Components.
These components are used as
<x-compnentname prop=“propvalue”>
In case of php variables
<x-compnentname :prop=“$propvalue”>
Create components conti…
Home page
Static UI
Repeated component “homeimg”
Check Out page:
Static Order summary
Repeated component “checkout”
Product details
Product Description
Repeated component “similar products”
Routes
Route::get('/', function () {
return view('home');
});
Route::get('/login', function
() {
return view('login');
});
Route::get('/register',
function () {
return view('signup');
});
Route::get('/checkout', function () {
return view('checkout');
});
Route::get('/productdetails', function ()
{
return view('productdetails');
});
Route::get('/profile', function () {
return view('profile');
});

Advance Web PPT.pptx

  • 1.
    Advance Web PPT EcommerceFront-end 18094198-082 18094198-100 18094198-101
  • 2.
    Create a laravelproject Run command : “composer create-project laravel/laravel frontend” Then change directory with command : “cd frontend” Run command to start the project: “php artisan serve”
  • 3.
    Add tailwindcss file Addtailwindcss minified file in public folder Create layout for nav and footer Create files in resource/views/layout folder
  • 4.
    Nav: Nav contains alogo and shop name on the left side On the right side 2 icons and 2 buttons  Icon for profile and cart  Buttons for login and signup The body tag is started in nav
  • 5.
    Fotter: Social media iconand copyright Body tag is closed here so every blade view which imports nav and footer can access app.css too. All blade views will include the nav at start and footer at the end @include('layouts.nav') // blade view content @include('layouts.footer')
  • 6.
    Create components Run command: “phpartisan make:component checkoutimg” This creates a component in views/component folder and a class in app/views In class of the component add the variables public $img; public $title; public $price; public $desc; Initialize them in constructor public function __construct($img,$title,$price,$desc) { $this->img = $img; $this->title = $title; $this->price = $price; $this->desc = $desc; }
  • 7.
    Each variable isused ad “{{$title}}” Repeat this process to create “Homeimg” and “Similarproducts” Components. These components are used as <x-compnentname prop=“propvalue”> In case of php variables <x-compnentname :prop=“$propvalue”> Create components conti…
  • 8.
    Home page Static UI Repeatedcomponent “homeimg”
  • 9.
    Check Out page: StaticOrder summary Repeated component “checkout”
  • 10.
    Product details Product Description Repeatedcomponent “similar products”
  • 11.
    Routes Route::get('/', function (){ return view('home'); }); Route::get('/login', function () { return view('login'); }); Route::get('/register', function () { return view('signup'); }); Route::get('/checkout', function () { return view('checkout'); }); Route::get('/productdetails', function () { return view('productdetails'); }); Route::get('/profile', function () { return view('profile'); });