samedi 28 mai 2016

Flex slider not working unless click a inspect using javascript

Here is my code

       <div class="modal fade" id="" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true"> 
      <div class="modal-dialog" style="width:65%">        
     <div class="modal-content login-modal">            
   <div class="modal-header login-modal-header">              
   <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  <h4 class="modal-title text-center" id="loginModalLabel"></h4>
   </div>            
 <div class="modal-body">              
 <div class="text-center">                   
 <div class="row">                                                               
 <div class="col-sm-7"> 
 <div class="flexslider">
  <ul class="slides">
 <?php foreach($product_get_img as $x)
   {?>
        <li data-thumb="">
            <div class="thumb-image"> 
            <img src="" data-imagezoom="true" class="img-responsive"> </div>
        </li>
        <?php
     }
   ?>
      </ul>

     </div>
     </div>                               
 <div class="col-sm-5" style="margin-top: 35px;border-left:1px dashed silver">
  <h2 class="step1-heading"></h2>                     
   <img src="<?php echo url(); ?>/assets/images/stars.png"> 
<span class="step1-para">2892 Ratings &nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;400 Reviews &nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;<a href="contact.php" class="step1-para">Have a Question?</a></span>
<div style="padding-top: 11px;">         
<div class="row" style="margin-bottom: 7px;">                  
<div class="col-xs-4 step1-para">MRP</div>                     
 <div class="col-xs-8  gre">                     
 <span class="step1-para">$</span>&nbsp;<s class="strike step1-para">    <span>999</span></s> [<span class="gre">50</span>% OFF] 
 </div>                  
 </div>                  
     <div class="row">                     
      <div class="col-xs-4 gre">Save</div>                     
      <div class="col-xs-8 gre">                     
   $&nbsp;                     
      <span class="gre"> 500</span>
 </div>                  
  </div>                        
  <div class="row" style="margin-top: 7px;">
  <div class="col-xs-4 pdp-e-i-PAY-l">Pay</div>               
 <div class="col-xs-8 pdp-e-i-PAY-r">                  
 <span>$&nbsp;<span class="payBlkBig" itemprop="price"></span></span>               
 </div>                        
 </div>         
 </div>               
    <div class="row">         
     <form role="form" action="" method="post">          
    <div class="col-sm-6">              
     <select class="form-control" id="select" name="select" placeholder="Enter Mobile no" required="required">   
    <option value="">----Select Color----</option>   
    <option value="1">Green</option>   
   <option value="2">Blue</option>   
   <option value="3">Orange</option>
     </select></div> 
      <div class="col-sm-6">   
     <select class="form-control" id="select" name="select" placeholder="Enter Mobile no" required="required">   
  <option value="">----Select Size----</option>   
  <option value="1">7</option>   
 <option value="2">8</option>   
  <option value="3">9</option></select> </div>                            
    <div class="clear"></div><br>                 
    <p class="loca-para" style="margin-top:15px;">Expect Delivery In 1 -  Days</p><br>                   
    <center> <button style="margin-top:10px;margin-right:15px;padding: 10px 50px;" type="submit" class="btn btn-lg btn-info">              
Add To Cart</button> </center>                
      </form>         
      </div>                                       
     </div>                                       
    <br>                      
   <br><br>                                                        
       </div>                              
  </div>            
   </div>                    
   </div>     
      </div>  
   </div>    

  <script>
  $(window).load(function() {
  $('.flexslider').flexslider({
  animation: "slide",
  controlNav: "thumbnails"
  });
  });
 </script>

When I click the quick view button to trigger the modal to show, the first image is displayed together with the image list but when I click the slider images, the slider doesn't move or work , but I click the inspect element to see if the images are loaded, its wrking.



via Chebli Mohamed

vendredi 27 mai 2016

Do I need to create a failed jobs table when using Redis as queue driver in laravel 5.2?

I'm using redis as the queue driver for Laravel 5.2. My problem is when a job fails, I get an exception in laravel.log which says PDO couldn't find the failed_jobs table.

I know I can use artisan to create the migration for creating failed jobs table, but do I need to do this when I'm running the queue on redis?



via Chebli Mohamed

Do we need to create models for all database object tables?

I'm a beginner when it comes to PHP, OOP and Laravel and I just need to ask this question. I know laravel has the very powerful Eloquent that I can use my question is, Is it advisable or best practice to create models on all database object tables that present in the database even if there are a lot? Is there anyway of doing this much better?



via Chebli Mohamed

Uploading laravel 5.2 in server

I have successfully uploaded all files of my laravel project to server, but it always displays 'page not found' error. the root directory donot have public_html folder. so i tried renaming public folder of laravel to public_html but it is still not working. It is still up and running in localhost.



via Chebli Mohamed

Get url param vue js and laravel

I am having problem fetching the parameter of my route. I am using laravel and vue js

ReservationController.php

public function index($id)
    {   

        $student = Student::with(['sectionSubjects','sectionSubjects.section', 
                    'sectionSubjects.subject'])->findOrFail($id);

        return $student->sectionSubjects;   

    }

all.js

methods:{

        fetchSubjects: function(){
            var self = this;
            this.$http({
                url: 'http://localhost:8000/reservation/id/student',
                method: 'GET'
            }).then(function (reservations){
                this.$set('reservations', reservations.data);
                console.log('success');

            }, function (response){
                console.log('failed');
            });
        }
    }

The problem here is, getting the value of the id of this url http://localhost:8000/reservation/id/student. Is there a way to get the id of the parameter of the index() method? Also here's my route list http://ift.tt/25q6BYA



via Chebli Mohamed

How to add comment to table (not column) in Laravel 5 migration?

How to add comment to table (ot column) in Laravel 5 migration?

I currently know how to add comment to column like:

$table->tinyInteger('status')->comment('0: requested; -1: rejected; 1:confirmed');

But what about table?



via Chebli Mohamed

Dynamic name of Angular`s ngModel in Laravel

<tr ng-repeat="row in cart">
      <td class="text-danger">@</td>
      <td class="text-info"><div ng-bind-html="appTitle_row.id"></div>

Angular does not allow this: ng-bind-html="appTitle_row.id"

It is in the blade template of Laravel 5.2



via Chebli Mohamed