Posts

Deploy Laravel Project On Heroku

Getting Started with Laravel on Heroku This guide will walk you through the configuration and deployment of a Laravel 5 application. For a general introduction to using PHP on Heroku, please refer to Getting Started with PHP on Heroku. Prerequisites: PHP (and ideally some Laravel) knowledge. A Heroku user account. Signup is free and instant. Familiarity with the Getting Started with PHP on Heroku guide, with PHP, Composer, and the Heroku CLI installed on your computer. Creating a Laravel application The application in this tutorial is based on the Laravel Installation guide. It’s worth a read before following the instructions in this article. Installing a new Laravel project: The composer create-project command is one of the ways you can bootstrap a new project based on the laravel/laravel standard application skeleton. The command below sets it up in a directory named hello_laravel using the latest version of the framework. After downloading an extensive number of de

How to reduce or compress image size while uploading using PHP

It is very common to upload images to the server or website by the users and admins. Users mostly upload their images for setting their profile picture or to submit documents and so on. But most of the time images are uploaded by the users are not optimized for the web, thus taking much more spaces on your server than that it actually need. Apart from this when you upload an image of large size, it takes more time to load on the web page, thus its effects on your website ranking. Uploaded images are very important and it should be reduced as much as possible. You can write some PHP code that reduces or compress image size while uploading to the server. But, of course reducing the image size will also reduce the image quality.  So, in this tutorial, I will show you how to reduce or compress image size while uploading using PHP. How to reduce or compress image size while uploading using PHP Step 1: Image Upload Form (index.php): <form method="post" enctype="mul

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,   PRIMARY KEY (`id`) ) E

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’ permissions tar  with 

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 line t

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