Mubeenali

Mubeenali

Member Since 1 Year Ago

Experience Points 1,670
Experience Level 1

3,330 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 5
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

22 Jun
3 weeks ago

Mubeenali left a reply on How To Make Animated Video Editing Or Animated Video Maker Tool? 3

@TRAY2 - i am unable to move in a one direction.please further explore..thanks

Mubeenali started a new conversation How To Make Animated Video Editing Or Animated Video Maker Tool? 3

Hello i want to create an online tool in which users can create animated videos or edit the videos same as animaker.com.. I am searching but not getting what i need.. Please give me the dirction to gain this goal.. Which languge or which thing is preferred for this... M loooking for your serious suggestions.. Happy knowledge happy coding... Thanks

17 Apr
2 months ago

Mubeenali left a reply on How To Associate Order Tracking Id To The Android Application??

@JLRDW - i already has seen this.this does not fulfill my requirements

16 Apr
3 months ago

Mubeenali left a reply on How To Associate Order Tracking Id To The Android Application??

@JLRDW - i could not found the packages that are used for realtime order tracking....

15 Apr
3 months ago

Mubeenali started a new conversation How To Associate Order Tracking Id To The Android Application??

i am implementing the realtime order tracking in my ecommerce website.I have a table called order. Order table contains following columns

Orders Table:
id
user_id
seller_id
tracking_id
totalPrice 

whenever a user place an order system generates an unique tracking id and that tracking id is stored in orders table.Now for realtime tracking i build an app that gives me the lat and long of the mobile phone location.I am getting that lat and long and showing map in my site dynamically.but i need to associate that tracking_id with that particular location.So how should i do please give me suggestion for that.

Note: User will enter the tracking id and system will give his order location in realtime.....

08 Apr
3 months ago

Mubeenali left a reply on Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, Object Given Always Saying On Create With Ajax

@SABONZY - i solved the problem by just changing the controller to the following.


$product_id = implode(', ',$request->product_id);

            //dd($product_id);
        //dd($request->all());
            //dd($request->product_id);
        $question = Question::create([
             
             'product_id' => $product_id,
             'question'       => $request->question,

        ]);
       
        return response()->json(['success' => 'question saved']);

Conclusion:

this Error comes up when you trying to save the data as array in create method over a single column.
thanks @

Mubeenali left a reply on Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, Object Given Always Saying On Create With Ajax

@SABONZY - unexpected ',' expecting ';' error showing after pasting your code at the top of method

Mubeenali left a reply on Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, Object Given Always Saying On Create With Ajax

@SABONZY - Ok how to change it .and i don't know why it is showing as array.i am passing a single value in view

Mubeenali left a reply on Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, Object Given Always Saying On Create With Ajax

@SABONZY - After dd($request->all())

array:2 [
  "product_id" => array:1 [
    "product_id" => "77"
  ]
  "question" => "hii"
]

Mubeenali left a reply on Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, Object Given Always Saying On Create With Ajax

@SABONZY - please tell me the solution.i have tried each and everything to save the data.but i am unable to solve this.

Mubeenali left a reply on Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, Object Given Always Saying On Create With Ajax

@ADAMPRICKETT - thanks for your reply man!But i tried everything to save the data if i removed these lines of code .everything works great.but i need to save the data into database so solution please

Mubeenali started a new conversation Argument 1 Passed To Illuminate\Database\Grammar::parameterize() Must Be Of The Type Array, Object Given Always Saying On Create With Ajax

i am creating the question but it always says the error mentioned in title. My code id here..

In my View


 @if(Auth::check())
            <div class="product-specifications" style="margin-top:50px;background:white;height:auto;">
                   <p style='color:red;' id="questionError"></p>
                   <textarea rows="6" cols="130" style="margin-top:5px;" id="question"></textarea>
                   <br>
                  <button class="button" style="height:50px;background:#FF4500;border:none;" 
                  id="askQuestionSubmit" data-product_id="{{ $product->id }}">Ask Question</button>
                   
             </div>
  @endif

My Ajax Request:

$("#askQuestionSubmit").click(function(){
            var question = $("#question").val();
            var product_id = $(this).data(product_id);
            if(question!=""){
                $("#questionError").text("");
                  
                  //send ajax request to save question 
                   alert(question);
                  
         $.ajax({
               headers: {
                  'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                   },

           method:'POST',
          
          url:"{{route('question.add')}}",

           type:"json",

           data:{product_id:product_id,question:question},

           success:function(data){
               if(data.success){
                  toastr.success(data.success);
                  //$("ul#comments-list li").prepend(data.output);
               }
                
               
               //$("#totalCart").html(data.totalItems);



               
             
           },
      
        });///ajax ends 
  
             
                //alert(question);
            }else{

                $("#questionError").text("Please Enter Something to ask");  
            }
            
    });

In My controller :

 public function saveQuestion(Request $request)
    {
        
        $product_id = $request->product_id;
        $question   = $request->question;

        $question   = new Question;

        $question->product_id = $product_id;
        $question->question   = $question;
        $question->save();
       
        return response()->json(['success' => 'question saved ']);
  }  

The ajax request send successfully but there is problem i can not recognize.please help me

27 Mar
3 months ago

Mubeenali left a reply on How To Implement Realtime Order Tracking In Ecommerce?

@JLRDW - Hii thanks for your reply.Your answer might be help me for what i want to implement this.

Mubeenali left a reply on How To Implement Realtime Order Tracking In Ecommerce?

@SNAPEY - can you please tell me any solution ?

Mubeenali left a reply on How To Implement Realtime Order Tracking In Ecommerce?

@MARTINBEAN - HOW can i develop this programmatically???

Mubeenali left a reply on How To Implement Realtime Order Tracking In Ecommerce?

@MARTINBEAN - Hi thanks for your reply.can you please tell me the general solution for implementing this...Later i will customize it.

Mubeenali left a reply on How To Implement Realtime Order Tracking In Ecommerce?

@SNAPEY - Thanks for you reply!I don't want to use the gps physical tracker.Give me solution that reduces the cost and works fine.

26 Mar
3 months ago

Mubeenali started a new conversation How To Implement Realtime Order Tracking In Ecommerce?

Hello Artisans!I need to implement realtime tracking of order when customer will give an order an unique id will generate by the system So i want to implement the realTime tracking.get the location of order and show on map in very realtime.please give me any soultion or idea to implement this .?I searched a lot but nothing found that fulfills my requirement.please help me thanks!!!

23 Mar
3 months ago

Mubeenali left a reply on How To Remove Item From Cart Through Session Laravel 5.6?

@ABDULAZIZ - you did it man!owsome..thankss so much

22 Mar
3 months ago

Mubeenali left a reply on How To Remove Item From Cart Through Session Laravel 5.6?

@JLRDW - i tried all stackoverflow answer nothing is working in my case

Mubeenali left a reply on How To Remove Item From Cart Through Session Laravel 5.6?

i tried a lot please tell me how to remove the specific key..i have price qty and item in my storedItem Array

Mubeenali left a reply on How To Remove Item From Cart Through Session Laravel 5.6?

hiii flush destroy whole cart sir

Mubeenali left a reply on How To Remove Item From Cart Through Session Laravel 5.6?

i write above code from watching a youtube video.now i need to remove items form cart via session.i tried everyhing i could not achieve this ..please help me..

Mubeenali left a reply on How To Remove Item From Cart Through Session Laravel 5.6?

i don't understand.how?please tell me

Mubeenali left a reply on How To Remove Item From Cart Through Session Laravel 5.6?

@TALINON - hello thanks for your reply.i just want to remove item from cart via session..

Mubeenali started a new conversation How To Remove Item From Cart Through Session Laravel 5.6?

I stored the items into cart via sessions.

Add items into cart code:

Cart Class:

  <?php
namespace App;

Class Cart
{

    public $item  = null ; //group of products
    public $totalQty = 0;
    public $totalPrice = 0;


    public function __construct($oldCart)
    {
       //if card already exists
      if($oldCart){
          
          $this->item        = $oldCart->item;
          $this->totalQty    = $oldCart->totalQty;
          $this->totalPrice  = $oldCart->totalPrice;


      }
    }

    public function add($item,$id)
    {
       
       $storedItem  = [
                        'qty' => 0,
                        'price' => $item->price,
                        'item'  => $item,
                       ];

        if($this->item){

             if(array_key_exists($id, $this->item)){

                 $storedItem = $this->item[$id];
             }
        }

        $storedItem['qty']++; //add each time qty 

        $storedItem['price'] = $item->price * $storedItem['qty'];

        $this->item[$id] = $storedItem;

        $this->totalQty++;

        $this->totalPrice += $item->price;

    }
}

Controller method that adds items into cart


// add to cart function 
    public function add_to_cart(request $request)
    {
      
      $product = Product::find($request->id);
      $oldCart = Session::has('cart') ? Session::get('cart') : null;

      $cart    = new cart($oldCart);

      $cart->add($product,$request->id);

      $request->session()->put('cart',$cart); //save into session 

      //$request->session()->get('cart');//for get what is in cart

      $totalItems = Session::get('cart')->totalQty;

      return response()->json(['success' => 'Added to cart!','totalItems' => $totalItems]);

    }

View Showing all items in cart code:

@foreach($products as $key => $product)
                               <tr width="100%">

                                  <td width="20%" class="text-center removeBtn"><img src="{{asset('frontEnd/images/delete-icn.svg')}}" data-product="{{$product['item'][$key]}}"></td>
                                  <td width="20%"><img src="{{Storage::url($product['item']['cover'])}}" class="img-rounded"></td>

                                  <td width="20%" class="text-center">{{$product['item']['product']}}</td>
                                  <td width="20%" class="text-center">{{$product['price']}}</td>
                                  <td width="20%" class="text-center">
                                    
                                       <button class="plus-btn" type="button" name="button">
                                         <img src="{{asset('frontEnd/images/plus.svg')}}" alt="" />
                                     </button>
                                     <input type="text" name="name" value="1" style="width:20%;height:5px;">
                                    <button class="minus-btn" type="button" name="button">
                                           <img src="{{asset('frontEnd/images/minus.svg')}}" alt="" />
                                    </button>
                                    
                                    
                                 </td>

                               </tr>

                              @endforeach

Remove Item method:

public function removeProductFromCart(Request $request)
    {
          $product = $request->product;
          
          unset($request->product); // it removes items  but temporary.when i refresh the page then the item is 
// shown me.

          return response()->json(['info' => 'Item Remove From Cart!']);
    }

Please give me solution.pleaseeee

Mubeenali left a reply on Link In Header File Always Returns To The Home Page

But for now i have fixed thank you very much

Mubeenali left a reply on Link In Header File Always Returns To The Home Page

OHH thanks GOD i solved my problem.i just ctr+x the route and paste it above 3 lines of the code.it worked.How bad was that.i have not duplicate route in my case..

Mubeenali left a reply on Link In Header File Always Returns To The Home Page

Yes i am sure it does not use the auth, any user can access this page

Mubeenali left a reply on Link In Header File Always Returns To The Home Page

I tried it also but there are no duplicate route in my we.php i don't know why it's not going into my controller method not showing me error.it should show me error at least.but no error..

Mubeenali left a reply on Link In Header File Always Returns To The Home Page

Yes m 100% sure.i am working on it to solve i could not solve a link from 4 past hours... a link only one link uffffffffffff

Mubeenali left a reply on Link In Header File Always Returns To The Home Page

If i do for testing purposes like

Route::view('/my','frontEnd.cart.cart'); //it also redirecting me home page not at cart page

Mubeenali started a new conversation Link In Header File Always Returns To The Home Page

My one herf link that is present in header file will always go to the home page.

index.blade.php this is link inside header file

 <li>
    <a href="/abc"><i class="fa fa-shopping-cart"></i> 
        My Cart
    <span class="badge" id="totalCart">{{Session::has('cart') ? Session::get('cart')->totalQty : ''}}</span>
    </a>
 </li>

Web.php

//show all cart data
    Route::get('/abc/','frontEndControllers\[email protected]')->name('abc');

Controller

public function abc(Request $req)
 {

   // Problem is that the compiler is not entering in this method if i return 
     // if i return 123 here it is not returning
     $oldCart = Session::get('cart');

        $cart    = new Cart($oldCart);

        /*return view('frontEnd.cart.view_all_cart',['products' => $cart->item,'totalPrice' => $cart->totalPrice]);*/

        $products = $cart->item;

        $totalPrice = $cart->totalPrice;

        return view('frontEnd.cart.view_all_cart',compact('products','totalPrice'));
    }

I don't know why it's happening but it is not entering in my method ..please give me solution ..i am trapped for 3 hours at this problem...

02 Mar
4 months ago

Mubeenali started a new conversation Laravel One To Many Relationships Returning Null

here are two models.product and image In My product model:

product.php

 // one to many   relationship with images table 
public function images()
{
    return $this->hasMany('App\image');
}

image.php

 public function product()
{
    return $this->belongsTo('App\product');


}

ProductController

public function productDetail($slug)
{
    $product = product::where([
      ['slug',$slug],
      ['seller_id' ,Auth::id()],
    ])->first();
    
  if($product)
    {
      

      //give images from the image table 
      $product_image   = \App\product::find(11)->images;
         $arr = array();

          foreach(\App\product::find($product->id)->images() as $i)
          {
            array($arr,$i->image);
          }

          dd($arr);  // problem returning always null 
        return view('backEnd.seller.product_detail',compact('product','image')); 
    }

Problem Statement: In my controller when i tried to get all the images of specific product i am getting Null . I am trying to solve this for one day ago.please help me Which i am missing?

Product Migration :

 public function up()
{
    Schema::create('products', function (Blueprint $table) {
        $table->increments('id');
        $table->unsignedInteger('seller_id');
        $table->unsignedInteger('category_id');
        $table->string('product');
        $table->text('discription');
        $table->timestamps();
    });
}

Image Migration :

  public function up()
{
    Schema::create('images', function (Blueprint $table){
        $table->increments('id');
        $table->unsignedInteger('product_id');
        $table->string('image');
        $table->timestamps();
    });
}
23 Feb
4 months ago

Mubeenali started a new conversation How To Retrive A Category And All It's Child In Tree Structure Same As All Ecommerce Sites ?

I have a table called categories.i stored data into it in such a manner if the category parent_id is 0 then it is the most parent category if category parent id is not 0 then obviously it is the child of anyone ...Means to say that i store the data into tree structure each category can be subcategory or may be sub sub category .Now i want to show them in navigation bar at frontend but i am not getting the actual logic to show them Any one please help me ..My category Model structure is givenbelow:

 id - primary key
category 
parent_id
slug
29 Dec
6 months ago

Mubeenali started a new conversation The Bootstrap/cache Directory Must Be Present And Writable On Shared Hosting Laravel

Hi i manually install a package in my live site and after i removed all the files manually.Now when i try to access my website any route or anything this is showing me this message

"The bootstrap/cache directory must be present and writable" i tried the following commands on my live server

  //Clear Cache facade value:
Route::get('/clear-cache', function() {
    $exitCode = Artisan::call('cache:clear');
    return '<h1>Cache facade value cleared</h1>';
});

//Reoptimized class loader:
Route::get('/optimize', function() {
    $exitCode = Artisan::call('optimize');
    return '<h1>Reoptimized class loader</h1>';
});

//Route cache:
Route::get('/route-cache', function() {
    $exitCode = Artisan::call('route:cache');
    return '<h1>Routes cached</h1>';
});

//Clear Route cache:
Route::get('/route-clear', function() {
    $exitCode = Artisan::call('route:clear');
    return '<h1>Route cache cleared</h1>';
});

//Clear View cache:
Route::get('/view-clear', function() {
    $exitCode = Artisan::call('view:clear');
    return '<h1>View cache cleared</h1>';
});

//Clear Config cache:
Route::get('/config-cache', function() {
    $exitCode = Artisan::call('config:cache');
    return '<h1>Clear Config cleared</h1>';
});

But it is showing me the same message even if i try to run the above commands ..Please help me what can i do now i am so upset Please help me ...

Mubeenali left a reply on Validation If One Field Is Filled Then Others Are Required

@NAKOV - @nakov this is my view code when someone clicks on add more it duplicates the row ..

 
        <div class="box_general padding_bottom">
            <div class="header_box version_2">
                <h2><i class="fa fa-clock-o"></i>Special&nbsp;/&nbsp;Holiday Hours</h2>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <table id="pricing-list-container" style="width:100%;">
                        <tbody><tr class="pricing-list-item">
                            <td>
                                <div class="row">
                                    <div class="col-md-4">
                                        <div class="form-group">
                                            <input type="text" class="form-control" placeholder="Title" name="holidays_title[]" id="holidays_title[]" >
                                        </div>
                                    </div>
                                    <div class="col-md-3">
                    <div class="form-group">
                        <input type="time" class="form-control" name="opening_holidays_hours[]"  id="opening_holidays_hours[]">
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <input type="time" name="closing_holidays_hours[]"  class="form-control" id="closing_holidays_hours[]">
                    </div>
                </div>
                                    <div class="col-md-2">
                                        <div class="form-group">
                                            <a class="delete" href="#"><i class="fa fa-fw fa-remove"></i></a>
                                        </div>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tbody></table>
                    <a href="#0" class="btn_1 gray add-pricing-list-item"><i class="fa fa-fw fa-plus-circle"></i>Add Item</a>
                    </div>
            </div>
            <!-- /row-->
        </div>