Posts

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

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

How to send email using gmail in PHP Laravel 5?

Image
Laravel is a very popular framework for PHP in today's. Laravel is famous because they provide several goods things like MVC, routing, mail etc. In this article, we will learn how to send email using SMTP driver. Laravel 5 provide several drivers options like SMTP, Mail, SendMail, and services supported include Mailgun, Sendgrid, Mandrill, Amazon SES, etc. So, here i will let you know how to send email from your Gmail account using SMTP driver. Laravel provides the configuration file for email. you can see that file here: config/mail.php, you can also make the change manually but laravel is smart so they provide .env file for configuration as like below: .env MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=addYourEmail MAIL_PASSWORD=AddYourEmailPassword MAIL_ENCRYPTION=tls You can simply configuration here as above env variable. now I am going to provide a simple example to add a new route to your route file as like bellow added. ro