Create database using nodejs

var mysql = require('mysql'); var con = mysql.createConnection({ host: "localhost", user: "root", password: "" }); con.connect(function(err) { if (err) throw err; console.log("Connected!"); con.query("CREATE DATABASE nodedb", function (err, result) { if…

0 Comments

Node js mysql

npm install mysql var mysql = require('mysql'); var con = mysql.createConnection({ host: "localhost", user: "root", password: "" }); con.connect(function(err) { if (err) throw err; console.log("Connected!"); });  

0 Comments

Export pdf in laravel

Install dompdf package composer require barryvdh/laravel-dompdf Enable GD & zip extension first (php.ini), then use this cmd. Goto config / app.php 'providers' => [ Barryvdh\DomPDF\ServiceProvider::class, ]; 'aliases' => [ 'PDF'…

0 Comments

Social share button in laravel using navigator share api

Goto this website for api https://crunchify.com/list-of-all-social-sharing-urls-for-handy-reference-social-media-sharing-buttons-without-javascript/ Click number of calling tel:1234567890 Click email for sending mail mailto:example@gmail.com Links for social share A. https://api.whatsapp.com/send?text=[post-title] [post-url] <a href="https://api.whatsapp.com/send?text=All Active Members <?php echo…

0 Comments

Row count and sum in laravel

$count = DB::table('is_profile_completed')->where('userd', $userid)->count(); $sum = DB::table('is_profile_completed')->where('userd', $userid)->sum('salary'); $data = DB::table('posts')->where('post_status_for_frontend', 1)->orderBy('updated_at', 'desc')->paginate(4); {{count($data)}}  

0 Comments

addEventListner() in js

<script> window.addEventListener('load', function () { document.getElementById("btn").click(); }) </script> document.addEventListener("click", function(){   document.getElementById("demo").innerHTML = "Hello World"; }); document.addEventListener("mouseover", triggerBtnClick); document.addEventListener("click", someOtherFunction); document.addEventListener("mouseout", someOtherFunction); <script> function triggerBtnClick() { document.getElementById("btn").click(); } </script

0 Comments