Araw

Araw

Member Since 1 Month Ago

Experience Points
1,400
Total
Experience

3,600 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
1,400 XP
Oct
24
2 days ago
Activity icon

Replied to Why After Post Request My New Blade File Is Not Open....

one question.....sir if want to post data using ajax to my controller function and I want to send that data to my blade file can you please tell me how ???

Activity icon

Replied to Why After Post Request My New Blade File Is Not Open....

sir can you please tell me how to get data inside controller function ??

Activity icon

Replied to Why After Post Request My New Blade File Is Not Open....

sir in my network tab i got the post value but when I print that data inside controller function nothing printed ...

Activity icon

Replied to Why After Post Request My New Blade File Is Not Open....

using

public function storeValue(Request $request)
{
    $data = $request->all();

    dd($data);
}

Activity icon

Replied to Why After Post Request My New Blade File Is Not Open....

@marianomoreyra sir thanks for your response.....one question if I want to print post data in my controller.....but data is not printed ???

Activity icon

Replied to Why After Post Request My New Blade File Is Not Open....

This is My js Function Through Whic i Post data...

$(".order_div" ).click(function() {
//  var text = $(this).text();
 
var text = $(this).find('div:last').text()
 
alert(text);
var data = { value : text };
  $.ajax({
    type: "POST",
    url: '/session/storeValue',
    data: data,
    headers: {
      'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    },
    success: function() {
     alert("hello");
    }
  });


});

This is My Route

Route::post('/session/storeValue',[ProductsController::class, 'storeValue']);

This is My Controller Function

public function storeValue(Request $request)
{
    return redirect()->route("cartProducts");
}
Activity icon

Started a new Conversation Why After Post Request My New Blade File Is Not Open....

Why After Post Request My New Blade File is Not Open....????

Activity icon

Started a new Conversation Laravel Post Request

Hey I am New in Laravel.....Can Anyone Please Help me to post my Data from Js File to my Controller function ???

Oct
22
4 days ago
Activity icon

Replied to Laravel Basic Problem

ty sir

Activity icon

Replied to Laravel Basic Problem

@automica Once Again You Helped me Out and Support Me Till the End of The Problem....Happy Howl-o-ween! Sir...

Activity icon

Replied to Laravel Basic Problem

css and bootstrap loded completely

Activity icon

Replied to Laravel Basic Problem

Sir doing this thing workes fine for all blade file except one file I don't know why...

Activity icon

Replied to Laravel Basic Problem

sir i did it but my header and footer have the same problem...but only body content workes fine

Activity icon

Replied to Laravel Basic Problem

Havent't host it anywhere....???sir is their any medium where I send you file of my project

Activity icon

Replied to Laravel Basic Problem

@automica sir, i done this ...but problem same

Activity icon

Replied to Laravel Basic Problem

@automica Their is a problem with one file, another file is running fine why sir ???

Activity icon

Replied to Laravel Basic Problem

Sir when i inspect that page all this will come but bootstrap is not working...

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>YantraDeals</title>
  <meta content="" name="description">
  <meta content="" name="keywords">

  <!-- Favicons -->
  <link href="assets/img/favicon.png" rel="icon">
  <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">

  <!-- Vendor CSS Files -->
  <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="assets/vendor/icofont/icofont.min.css" rel="stylesheet">
  <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="assets/vendor/venobox/venobox.css" rel="stylesheet">
  <link href="assets/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet">
  <link href="assets/vendor/aos/aos.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="assets/css/style.css" rel="stylesheet">


</head>

<body>

  <!-- ======= Top Bar ======= -->
  <section id="topbar" class="d-none d-lg-block">
    <div class="container d-flex">
      <div class="contact-info mr-auto ">
        <ul>
          <li><i class="icofont-envelope"></i><a href="mailto:[email protected]">[email protected]</a></li>
          <li><i class="icofont-phone"></i> +1 5589 55488 55</li>
          <li><i class="icofont-clock-time icofont-flip-horizontal"></i> Mon-Fri 9am - 5pm</li>
        </ul>

      </div>
      <div class="cta">
        <a href="#about" class="scrollto">Get Started</a>
      </div>
    </div>
  </section>

  <!-- ======= Header ======= -->
  <header id="header">
    <div class="container d-flex">

      <div class="logo mr-auto">
        <h1 class="text-light"><a href="/"><span style="color: white">YantraDeals</span></a></h1>
        <!-- Uncomment below if you prefer to use an image logo -->
        <!-- <a href="index.html"><img src="assets/img/logo.png" alt="" class="img-fluid"></a>-->
        
      </div>
      <div>
         
      </div>
      
      <div class="mt-1" style="margin-right: 90px">
       <form class="navbar-form" role="search">
    <div class="input-group add-on">
      <input class="form-control" placeholder="Search for Products,brand and more" name="srch-term" id="srch-term" type="text" size="40">
      <div class="input-group-btn ">
        <button class="btn btn-primary" type="submit"><i class="icofont-ui-search"></i></button>
      </div>
    </div>
  </form>
  </div>

      <nav class="nav-menu d-none d-lg-block">
        <ul >
          
          
          
          
           <li class="drop-down"><a href="" style="color: white">My Account</a>
            <ul>
              <li><a href="#">Drop Down 1</a></li>
              <li class="drop-down"><a href="#">Drop Down 2</a>
                <ul>
                  <li><a href="#">Deep Drop Down 1</a></li>
                  <li><a href="#">Deep Drop Down 2</a></li>
                  <li><a href="#">Deep Drop Down 3</a></li>
                  <li><a href="#">Deep Drop Down 4</a></li>
                  <li><a href="#">Deep Drop Down 5</a></li>
                </ul>
              </li>
              <li><a href="#">Drop Down 3</a></li>
              <li><a href="#">Drop Down 4</a></li>
              <li><a href="#">Drop Down 5</a></li>
            </ul>
          </li>
     
								               
	 

           <li class=""><a href="http://127.0.0.1:8000/cart" style="color: white"><i class="icofont-shopping-cart"></i> Cart <span style="font-weight: bolder;color:greenyellow">3</span> </a>
           
              
			  </li>
			               
           
		  </li>
		  
          		  <li class=""><a href="/home" style="color: white">Profile </a></li>
		  											<li class=""><a href="/login" style="color: yellow;font-family:bolder">Atul Rawat </a></li>
						   

        </ul>
      </nav><!-- .nav-menu -->

    </div>
  </header><!-- End Header -->


  	
<div class="container">
    <div class="row">
    <ul class="list-group">

        <li class="list-group-item">Status:-
             
          
        <li class="list-group-item">Shipping Cost<span style="text-align: right">Free<span/></li>
        <li class="list-group-item">Total Amount:-690</li>
         
    </ul>
    <a class="btn btn-success btn-block" href="http://127.0.0.1:8000/product/paymentIni">Pay Now</a>
</div>
</div>
     
 
<!-- ======= Footer ======= -->
  <footer id="footer">

    <div class="footer-top">
      <div class="container">
        <div class="row">

          <div class="col-lg-3 col-md-6 footer-contact">
            <h3>YantraDeals</h3>
            <p>
             DDN<br>
              UTTARAKHAND , NY 535022<br>
               <br><br>
              <strong>Phone:</strong>7897646686<br>
              <strong>Email:</strong> i[email protected]<br>
            </p>
          </div>

          <div class="col-lg-2 col-md-6 footer-links">
            <h4>Useful Links</h4>
            <ul>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Home</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="#">About us</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Services</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Terms of service</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Privacy policy</a></li>
            </ul>
          </div>

          <div class="col-lg-3 col-md-6 footer-links">
            <h4>Our Services</h4>
            <ul>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Web Design</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Web Development</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Product Management</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Marketing</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="#">Graphic Design</a></li>
            </ul>
          </div>

          <div class="col-lg-4 col-md-6 footer-newsletter">
            <h4>Join Our Newsletter</h4>
            <p>Tamen quem nulla quae legam multos aute sint culpa legam noster magna</p>
            <form action="" method="post">
              <input type="email" name="email"><input type="submit" value="Subscribe">
            </form>
          </div>

        </div>
      </div>
    </div>

    <div class="container d-lg-flex py-4">

      <div class="mr-lg-auto text-center text-lg-left">
        <div class="copyright">
          &copy; Copyright <strong><span>YantraDeals</span></strong>. All Rights Reserved
        </div>
       
      </div>
      <div class="social-links text-center text-lg-right pt-3 pt-lg-0">
        <a href="#" class="twitter"><i class="bx bxl-twitter"></i></a>
        <a href="#" class="facebook"><i class="bx bxl-facebook"></i></a>
        <a href="#" class="instagram"><i class="bx bxl-instagram"></i></a>
        <a href="#" class="google-plus"><i class="bx bxl-skype"></i></a>
        <a href="#" class="linkedin"><i class="bx bxl-linkedin"></i></a>
      </div>
    </div>
  </footer><!-- End Footer -->

  <a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>

  <!-- Vendor JS Files -->
  <script src="assets/vendor/jquery/jquery.min.js"></script>
  <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="assets/vendor/jquery.easing/jquery.easing.min.js"></script>
  <script src="assets/vendor/php-email-form/validate.js"></script>
  <script src="assets/vendor/jquery-sticky/jquery.sticky.js"></script>
  <script src="assets/vendor/venobox/venobox.min.js"></script>
  <script src="assets/vendor/owl.carousel/owl.carousel.min.js"></script>
  <script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
  <script src="assets/vendor/aos/aos.js"></script>

  <!-- Template Main JS File -->
  <script src="assets/js/main.js"></script>

</body>

</html>
Activity icon

Started a new Conversation Laravel Basic Problem

Bootstrap works fine for all blade file except one...i don't know why ...please help me

Oct
15
1 week ago
Activity icon

Replied to Laravel App Deploy Question

solved sir

Oct
12
2 weeks ago
Activity icon

Started a new Conversation Laravel App Deploy Question

403 Forbidden
nginx/1.18.0

This Error comes when I open my laravel app which I deploy in elastic beanstalk....(AWS)

Oct
11
2 weeks ago
Activity icon

Replied to TEMPORARY Table In Laravel

@mvd

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class TempData extends Migration
{
   /**
    * Run the migrations.
    *
    * @return void
    */
   public function up()
   {
       Schema::create('temp_data', function (Blueprint $table) {
       $table->increments('id');
       $table->integer('sender_id');
       $table->integer('receiver_id');
       $table->string('message');
       $table->timestamps();
       $table->temporary();
   });
   }

   /**
    * Reverse the migrations.
    *
    * @return void
    */
   public function down()
   {
       Schema::dropIfExists('temp_data');
   }
}

Oct
10
2 weeks ago
Activity icon

Replied to TEMPORARY Table In Laravel

is temp table shown in the database ???......temp_data table is not shown in my database sir

Activity icon

Replied to TEMPORARY Table In Laravel

@mvd i already run php artisan migrate

    

    DB::table('temp_data')->insert(['sender_id'=>2,'receiver_id'=>3,'message'=>'message temp check']);

    $data = DB::table('temp_data')->get();
dd($data);	
    Schema::drop('temp_data');

    return $data;
}

Same Error Sir

Activity icon

Replied to TEMPORARY Table In Laravel

@mvd using migration i create the table...sir

Activity icon

Replied to Where Are You All From?

I am From India

Activity icon

Started a new Conversation TEMPORARY Table In Laravel

This is My controller function

    public function temporary_check()
{
    
    

    DB::table('temp_data')->insert(['sender_id'=>2,'receiver_id'=>3,'message'=>'message temp check']);

    $data = DB::table('temp_data')->get();

    Schema::drop('temp_data');

    return $data;
}


when I call this function i got an Error

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shoppingsite.temp_data' doesn't exist (SQL: insert into `temp_data` (`sender_id`, `receiver_id`, `message`) values (2, 3, message temp check))

Note That this is Temp Table

Oct
05
3 weeks ago
Activity icon

Replied to Basic Question Part 2

@sinnbeck NEVER MIND SIR YOU HELPED ME ALOT......

Activity icon

Replied to Basic Question Part 2

@michaloravec right.... you guys are awesome.....that's why I love this community...

Activity icon

Replied to Basic Question Part 2

@sinnbeck problem not sloved sir

Trying to get property 'Transistor_manufacturer' of non-object
Activity icon

Replied to Basic Question Part 2

@sinnbeck yes sir attributes of product

Activity icon

Replied to Basic Question Part 2

@sinnbeck This error is coming after using this ....

Cannot use object of type App\Cart as array
Activity icon

Replied to Basic Question Part 2

@automica @sinnbeck

And this is my controller function ....

    public function addProductToCart(Request $request, $id){
      
       $prevCart = $request->session()->get('cart');
       $cart = new Cart($prevCart);

       $product = Productdetail::find($id);
       
       $cart->addItems($id,$product);
     
       $request->session()->put('cart', $cart);

       dd($cart);
      
      
       

    //    dump($cart);
    
    return redirect()->route("allProducts");
     

    }
Activity icon

Replied to Basic Question Part 2

@sinnbeck this is how i add

<?php

namespace App;

class Cart{
    public $items;
    public $totalQuantity;
    public $totalPrice;

    public function __construct($prevCart){
        if($prevCart != null){
            $this->items = $prevCart->items;
            $this->totalQuantity = $prevCart->totalQuantity;
             $this->totalPrice = $prevCart->totalPrice;


        }else{

            $this->items = [];
            $this->totalQuantity = 0;
             $this->totalPrice = 0;
        }

    }
    public function addItems($id,$product){
        $price = (int)str_replace("$","",$product->price);
        // if items already exists
        // if($this->items && array_key_exists($id,$this->items))
          if(array_key_exists($id,$this->items))
        {
            $productToAdd = $this->items[$id];
            $productToAdd['quantity']++;
            $productToAdd['totalSinglePrice'] = $productToAdd['quantity'] * $price;

        }else{
    //    first time to add item to the cart 
    $productToAdd=['quantity'=>1,'totalSinglePrice'=>$price,'data'=>$product];

    }
    $this->items[$id] = $productToAdd;
    $this->totalQuantity++;
    $this->totalPrice = $this->totalPrice+$price;

    }

    public function updatePriceAndQuantity(){
        $totalPrice =0;
        $totalQuantity = 0;
        foreach($this->items as $item){
           $totalQuantity = $totalQuantity + $item['quantity'];
           $totalPrice = $totalPrice + $item['totalSinglePrice'];
        }
    $this->totalPrice = $totalPrice;
    $this->totalQuantity = $totalQuantity; 

    }
    

}

?>
Activity icon

Replied to Basic Question Part 2

@automica this is how i add

<?php

namespace App;

class Cart{
    public $items;
    public $totalQuantity;
    public $totalPrice;

    public function __construct($prevCart){
        if($prevCart != null){
            $this->items = $prevCart->items;
            $this->totalQuantity = $prevCart->totalQuantity;
             $this->totalPrice = $prevCart->totalPrice;


        }else{

            $this->items = [];
            $this->totalQuantity = 0;
             $this->totalPrice = 0;
        }

    }
    public function addItems($id,$product){
        $price = (int)str_replace("$","",$product->price);
        // if items already exists
        // if($this->items && array_key_exists($id,$this->items))
          if(array_key_exists($id,$this->items))
        {
            $productToAdd = $this->items[$id];
            $productToAdd['quantity']++;
            $productToAdd['totalSinglePrice'] = $productToAdd['quantity'] * $price;

        }else{
    //    first time to add item to the cart 
    $productToAdd=['quantity'=>1,'totalSinglePrice'=>$price,'data'=>$product];

    }
    $this->items[$id] = $productToAdd;
    $this->totalQuantity++;
    $this->totalPrice = $this->totalPrice+$price;

    }

    public function updatePriceAndQuantity(){
        $totalPrice =0;
        $totalQuantity = 0;
        foreach($this->items as $item){
           $totalQuantity = $totalQuantity + $item['quantity'];
           $totalPrice = $totalPrice + $item['totalSinglePrice'];
        }
    $this->totalPrice = $totalPrice;
    $this->totalQuantity = $totalQuantity; 

    }
    

}

?>
Activity icon

Replied to Basic Question Part 2

@automica sir i just simply dd($cart);

Activity icon

Started a new Conversation Basic Question Part 2

=====================How to Access the values of the attributes======================

App\Cart {#305 ▼
  +items: array:2 [▼
    3 => array:3 [▼
      "quantity" => 1
      "totalSinglePrice" => 678
      "data" => App\Models\Productdetail {#298 ▼
        #connection: "mysql"
        #table: "productdetails"
        #primaryKey: "id"
        #keyType: "int"
        +incrementing: true
        #with: []
        #withCount: []
        #perPage: 15
        +exists: true
        +wasRecentlyCreated: false
        #attributes: array:15 [▼
          "id" => 3
          "Transistor_manufacturer" => "Aman"
          "Packaging_series" => "7898"
          "part_status" => "NA"
          "transistor_type" => "789"
          "current-collector_Ic(max)" => "678"
          "voltage-collector_emitter_breakdown(max)" => "5456"
          "Vce_saturation(max)[email protected]_Ic" => "5456"
          "current-collector_cut_off(max)" => "678"
          "[email protected]_Vce" => "78"
          "Power-max" => "567"
          "Quantity_Available" => 45
          "price" => "678.00"
          "Minimum_Quantity" => 4
          "image" => "prod1.jpeg"
        ]
        #original: array:15 [▶]
        #changes: []
        #casts: []
        #classCastCache: []
        #dates: []
        #dateFormat: null
        #appends: []
        #dispatchesEvents: []
        #observables: []
        #relations: []
        #touches: []
        +timestamps: true
        #hidden: []
        #visible: []
        #fillable: []
        #guarded: array:1 [▶]
      }
    ]
Oct
03
3 weeks ago
Activity icon

Started a new Conversation Guide Me To Implement Shopping Cart With Database In Laravel

implement shopping cart with the database in laravel.....

Sep
28
4 weeks ago
Activity icon

Started a new Conversation Laravel Basic Question 2

I want to pass data from my controller function to Blade.But I got an Error

=======================My Route======================


Route::get('getuserAdd',[UserAddressController::class, 'getuserAddress'])->name('getuserAdd');


==========================Controller Function==================================


<?php

namespace App\Http\Controllers;
use App\Models\Product;
use App\Cart;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;
use Auth;

class UserAddressController extends Controller
{
    public function getuserAddress(){
       
       
         return view('example')->with('title','My App');
    }
}

=======================Blade File=====================

<div class="p-3"><a href="{{route('getuserAdd')}}" class="btn btn-info">Get Saved Address</a></div>
						    
{{ $title }}

=======================================ERROR=========================

Undefined variable: title (View: D:\EcommerceProjectMA\EcomMA\resources\views\example.blade.php)
Sep
26
1 month ago
Activity icon

Replied to Laravel Basic Question

sure sir it is typo mistake....

Activity icon

Replied to Laravel Basic Question

@tykus sorry sir it is Typo Mistake when I write My problem here.....


return view('checkoutproducts',compact('useraddress'));
Activity icon

Started a new Conversation Laravel Basic Question

I have a database name orders

My Controller Function


     public function addres(){

        
          $id =  $userid = Auth::user()->id;
    

        $useraddress = DB::table('orders')->where('user_id', $id)->get();


         
          return view('checkout',compact('useraddress'));
    }

This is only the part of my Blade file .I want to Loop through the address in my blade file but I got an error....

@foreach ($useraddress as $useradd)
	<p> {{ $useradd->address }}</p>
@endforeach

								

This is My Route

Route::get('useraddress',[ProductsController::class, 'addres'])->name('useraddress');

+++++++++++++++++++++++++++++++Error+++++++++++++++++++++++++++++++

Undefined variable: useraddress (View: D:\EcommerceProjectMA\EcomMA\resources\views\checkoutproducts.blade.php)

Help Me....

Activity icon

Replied to How To Display Session Values In HTML

@automica Thank You Sir it works.....

Sep
25
1 month ago
Activity icon

Replied to How To Display Session Values In HTML

	<li><a href="{{route('cartProducts')}}"><i class="fa fa-shopping-cart"></i> Cart<span style="color:green;font-weigth:400px;">{{!! Session::get('cart') !!}}</span></a></li>

Give Error to me

Object of class App\Cart could not be converted to string (View: D:\EcommerceProjectMA\EcomMA\resources\views\layouts\header.blade.php)

Activity icon

Started a new Conversation How To Display Session Values In HTML

I Try This

	<li><a href="{{route('cartProducts')}}"><i class="fa fa-shopping-cart"></i> Cart<span style="color:green;font-weigth:400px;">{{ Session::get('cart')[0]}}</span></a></li>

And I want to get the Value of totalquantity from the below session

 $cart = Session::get('cart');