Posts

User login and registration using nodejs and mysql with example:

In this tutorial, I am going to create simple email and password login authentication and register a user using nodejs and mysql. I will save simple password in mysql database but this is not good practice for security reason so in next tutorial, you will know the use of BCrypt module of Node.js to encrypt passwords. This tutorial will explain only how to save a record in mysql table and how to check email exist or not in the table with given password. To handle post parameters of Http request in Node.js, we use Body-Parser module. Step1: Table and directory structure: In first step, create a "users" table in the database by running following command in phpmyadmin or in mysql shell : CREATE TABLE `users` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `name` varchar(255) NOT NULL,   `email` varchar(255) NOT NULL,   `password` varchar(255) NOT NULL,   `created_at` datetime NOT NULL,   `updated_at` datetime NOT NULL,   ...

PHPMyBackup - A PHP MySQL differential backup script

A PHP MySQL differential backup script PHPMyBackup is a PHP script designed for backing up an entire MySQL server on the command line. What makes it unique is it only uses use  differential  methods to dump only the changes as it keeps a local copy of all the synced databases & tables. Software features Only download changed/altered tables (checksum) Allows specifying subset of databases for backups (supports wildcard) Allows skipping of specified databases from backups (supports wildcard) Allows skipping of specified tables or table-data (supports wildcard) Integrates with  mysqldump  client for individual sql dumps Backup rotation Limitations No database locking during backup. because a separate `mysqldump` is called for every table download, only table locking is used. This has been tested in several environments, but your own full testing is always advised! Requirements A MySQL user on the server with ‘SELECT’ & ‘LOCK TABLES’ permi...

Laravel Latest Interview Questions With Answers

Image
1.What is Laravel? Laravel is free open source “PHP framework” based on MVC Design Pattern. It is created by Taylor Otwell. Laravel provides expressive and elegant syntax that helps in creating a wonderful web application easily and quickly. 2. List some official packages provided by Laravel? Cashier Envoy Passport Scout Socialite 3. List out latest features of Laravel. Inbuilt CRSF (cross-site request forgery) Protection. Inbuilt paginations Reverse Routing Query builder Route caching Database Migration IOC (Inverse of Control) Container Or service container. 4. List out some benefits of Laravel over other Php frameworks.  Setup and customization process is easy and fast as compared to others. Inbuilt Authentication System. Supports multiple file systems Pre-loaded packages like Laravel Socialite, Laravel cashier, Laravel elixir,Passport,Laravel Scout. Eloquent ORM (Object Relation Mapping) with PHP active record implementation. Built-in command li...

Convert a PHP script into a stand-alone windows executable

PHP Desktop is the most simple and best solution. It is an open source project founded by Czarek Tomczak in 2012 to provide a way for developing native desktop GUI applications using web technologies such as PHP, HTML5, JavaScript, and SQLite. You can download the PHP Desktop from  https://github.com/cztomczak/phpdesktop People who have used local server like xampp, wampp etc, it won't be a problem to understand the concept. Just download PHP Desktop and copy your whole project in the www folder located in PHP Desktop directory (phpdesktop/www/). Its done, now click the executable file (phpdesktop-chrome.exe). You will see an exact replica of your website. Please check these bellow link for further instruction : https://phpocean.com/tutorials/design-and-illustration/create-your-first-desktop-application-with-php-and-php-desktop/4 https://stackoverflow.com/questions/9046675/convert-a-php-script-into-a-stand-alone-windows-executable

Laravel 5 and Vue JS SimpleCRUD with Pagination example

Image
 Most popular JS Framework are Angular JS, Vue JS, and ReactJs. Angular JS and Vue JS are a very user-friendly JS Framework and most popular. It provides to manage whole project or application without refresh page and powerful jquery validation. In this post, I going to learn how to Simple BookCrud application with pagination using Laravel 5. In this example I added "Book Management" with you can do several options like as below: 1. Book Listing 2. Book Create 3. Book Edit 4. Book Delete Step 1: Laravel Installation In first step, If you haven't installed Laravel in your system then you have to run bellow command and get fresh Laravel project. composer create-project --prefer-dist laravel/laravel BookCrud Step 2: Create books table and model In this step we have to create migration for books table using Laravel 5 php artisan command, so first fire bellow command: php artisan make:migration create_books_table After this command, you will fin...

Simple Angular Crud Operation

Image
Now I show you how to create CRUD(Create, Read, Update, Delete) using AngularJS Without using Database. By using this following code you can create simple crud for users. <!doctype html> <html lang="en">   <head>     <title>Angular Crud</title>     <!-- Required meta tags -->     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">     <!-- Bootstrap CSS -->     <link data-require="bootstrap@4.0.5" data-semver="4.0.5" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" />     <link rel="stylesheet" type="text/css" href="style.css">       <!-- Java Script -->     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>   ...

Laravel 5 Chart example using Charts Package

Image
It's always a good fit for understanding if we use some graphical way display our progress report using the chart. So if you are working with laravel 5 framework then you can use chart very simple way and best layout. There are several js libraries available for a chart like chartjs, highcharts, google, material, chartist, fusioncharts, Morris, plottablejs etc. in this example we will just use one laravel "ConsoleTVs/Charts" composer package and you can use all the chart library. Using above library you can simply create following Charts. 1. line chart 2. area chart 3. bar chart 4. pie chart 5. donut chart 6. geo chart 7. gauge chart 8. temp chart 9. percentage chart 10. progress bar chart 11. areaspline chart 12. scatter chart Using ConsoleTVs/Charts package we can simply create above lists on the chart. We don't require to write jquery code for the chart we can manage it from a controller method. So here I give you a very easy example o...