This is default featured post 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Sweet Alert Install in Vue

npm install sweetalert2

Install Fontawasome

npm install @fortawesome/fontawesome-free

Install Admin-LTE version 3.0.0

npm install admin-lte@v3.0.0-alpha.2 --save

KeyBoard Refresh will not change the Route in vue.js

Go to web.php Route

Paste the code

Route::get('/{anypath}','HomeController@index')->where('path','.*');

Refresh form on click of cancel button

<form method="post" id="sample_form" class="form-horizontal" enctype="multipart/form-data">
                   @csrf

                   <div class="form-group">
                       <label class="control-label col-md-3"> Phone<big class="text-danger">*</big></label>
                       <div class="col-md-8">
                           <input type="text" value="" class="form-control" id="phone" name="phone" placeholder="Enter Full Phone No" required>
                           <div id="visitorList"></div>
                       </div>
                   </div>

                       <div class="form-group">
                           <label class="control-label col-md-3" >Name<big class="text-danger">*</big></label>
                           <div class="col-md-8">
                               <input type="text" value="" name="name" id="name" class="form-control" placeholder="Enter Visitor Name"  required/>
                           </div>
                       </div>


                   <div class="form-group">
                       <label class="control-label col-md-3">Email<big class="text-danger">*</big></label>
                       <div class="col-md-8">
                           <input type="email" value="" class="form-control" id="email" name="email" placeholder="Enter Visitor Email" required>
                       </div>
                   </div>



                   <div class="form-group">
                       <label class="control-label col-md-3"> Company<big class="text-success"></big></label>
                       <div class="col-md-8">
                           <input type="text" class="form-control" id="company" name="company" placeholder="Enter Company Name">
                       </div>
                   </div>

                   <div class="form-group">
                       <label class="control-label col-md-3"> C.Address<big class="text-success"></big></label>
                       <div class="col-md-8">
                    <input type="text" class="form-control" id="address" name="address" placeholder="Enter Company Email">
                       </div>
                   </div>



         <div class="form-group" align="center">
             <input type="hidden" name="action" id="action" />
            <input type="hidden" name="hidden_id" id="hidden_id" />
            <input type="submit" name="action_button" id="action_button" class="btn btn-success" value="Add" />
                   </div>
               </form>
    
   
<script>
$("#cancel").click(function () {
   $('#sample_form')[0].reset();
   $("#name").val("");
   $("#phone").val("");
   $("#results").html("");
   $("#email").val("");
   $("#company").val("");
   $("#address").val("");
});
<script>

How to remove /public from URL

First add a file name .htaccess
After that add this code
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes    </IfModule>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -d [OR]    RewriteCond %{REQUEST_FILENAME} -f    RewriteRule ^ ^$1 [N]
   RewriteCond %{REQUEST_URI} (\.\w+$) [NC]   RewriteRule ^(.*)$ public/$1

    RewriteCond %{REQUEST_FILENAME} !-d    RewriteCond %{REQUEST_FILENAME} !-f    RewriteRule ^ server.php</IfModule>



Refresh your Project without /public

Visit here to get the file: https://drive.google.com/open?id=1rkAYoaXBC6JSJM6PCApx2FnqkfxHF9EQ

Capture Image using Webcam and Store it to Database in Laravel 6.0.*

In Blade File use this code to capture image

<div class="form-group"> 
<label class="control-label col-md-3">Image<big class="text-danger">*</big></label> 
<div class="col-md-4"> 
<div id="my_camera"></div> 
 </div> 
<div class="col-md-4"> 
<div id="results">Your Image</div> 
<input style="display:none" name="image" id="image" class="form-control" /> 
</div> 
<input type=button value="Take Photo" onClick="take_snapshot()"></div>
 
 
 // Webcam JS//
    <script>        Webcam.set({
            width: 195, 
 height: 100, 
 image_format: 'jpeg',             
jpeg_quality: 90 
 }); 
 Webcam.attach( '#my_camera' );
    </script> 
<script language="JavaScript">         
function take_snapshot() {
            // take snapshot and get image data 
 Webcam.snap( function(data_uri) {
                // display results in page 
 document.getElementById('results').innerHTML = '<img src="'+data_uri+'"/>'; 
 $("#image").attr('value',data_uri);
            } );        }
    </script>    // Webcam JS// 


In the Controller use this Code

$image = $request->image;
$exploded=explode(',',$image); 
$decoded=base64_decode($exploded[1]);
if(Str::contains($exploded[0],'jpeg'))
{ 
 $extention='jpg'; 
} 
else{     
$extention='png'; 
}
$fileName=Str::random(15).'.'.$extention;
 $path=public_path('images').'/'.$fileName;file_put_contents($path,$decoded);

$form_data = array(    
    'image'             =>  $fileName,
);


Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More