Posts

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

Laravel Stats Tracker

Image
Why? Storing user tracking information, on indexed and normalized database tables, wastes less disk space and ease the extract of valuable information about your application and business. Usage As soon as you install and enable it, Tracker will start storing all information you tell it to, then you can in your application use the Tracker Facade to access everything. Here are some of the methods and relatioships available: How you write your won method : <?php class Tracker Extends Eloquent {     public $attributes = ['hits' => 0];     protected $fillable = ['ip', 'date'];     public $timestamps = false;     protected $table = 'visitor';     public static function boot() {         // When a new instance of this model is created...         static::creating(function ($tracker) {             $tracker->hits = 0;         } );         // Any time the instance is saved (create OR update)