1595224140
Charts are frequently used to make the better understanding of a large set of data and the relationships between parts of the data. Charts can be scanned swiftly and efficiently, then compare to raw data.
Highcharts is an excellent open-source chart library, and you can represent data in through many ways. Such as Pie Charts, Line Charts, Bar Charts, Area Charts etc. In this tutorial, we are going to focus on creating a line chart using Highcharts with laravel.
Ideally, we need a new laravel application to write down about using Highcharts in Laravel. You can ignore this process if you already have the laravel app installed.
Otherwise, execute the given below command to define an archetype of laravel 7 application.
composer create-project laravel/laravel laravel-highcharts-example --prefer-dist
BashCopy
The execution of the above command heralds app has installed, now without wasting too much time get inside the app.
cd laravel-highcharts-example
BashCopy
Tutorial’s this part heralds about making the consensus between database and laravel application. Well, who doesn’t want to play around with data?
I meant with fetching and storing the data, so insert your database details in .envfile. Such as information consists of your database name, user name and password.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
.propertiesCopy
Run the following command to migrate the default user to the database.
php artisan migrate
#laravel
1625034420
Today I will show you How to Send E-mail Using Queue in Laravel 7/8, many time we can see some process take more time to load like payment gateway, email send, etc. Whenever you are sending email for verification then it load time to send mail because it is services. If you don’t want to wait to user for send email or other process on loading server side process then you can use queue.
#how to send e-mail using queue in laravel 7/8 #email #laravel #send mail using queue in laravel 7 #laravel 7/8 send mail using queue #laravel 7/8 mail queue example
1595201363
First thing, we will need a table and i am creating products table for this example. So run the following query to create table.
CREATE TABLE `products` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
Next, we will need to insert some dummy records in this table that will be deleted.
INSERT INTO `products` (`name`, `description`) VALUES
('Test product 1', 'Product description example1'),
('Test product 2', 'Product description example2'),
('Test product 3', 'Product description example3'),
('Test product 4', 'Product description example4'),
('Test product 5', 'Product description example5');
Now we are redy to create a model corresponding to this products table. Here we will create Product model. So let’s create a model file Product.php file under app directory and put the code below.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
protected $fillable = [
'name','description'
];
}
Now, in this second step we will create some routes to handle the request for this example. So opeen routes/web.php file and copy the routes as given below.
routes/web.php
Route::get('product', 'ProductController@index');
Route::delete('product/{id}', ['as'=>'product.destroy','uses'=>'ProductController@destroy']);
Route::delete('delete-multiple-product', ['as'=>'product.multiple-delete','uses'=>'ProductController@deleteMultiple']);
#laravel #delete multiple rows in laravel using ajax #laravel ajax delete #laravel ajax multiple checkbox delete #laravel delete multiple rows #laravel delete records using ajax #laravel multiple checkbox delete rows #laravel multiple delete
1597727551
yajra datatables crud with ajax in laravel 7. In this post, i will show you how to create crud using datatable in laravel with ajax and model.
Now, i am going to show you how to install and use datatables in laravel 7 application. i will use jquery ajax crud with modals using datatables js in laravel 7. i will write easy code of jquery ajax request for crud with yajra datatable.
Use the below steps and create yajra DataTables crud with ajax in laravel:
Step 1: Install Laravel App For DataTable Crud
Step 2: Configuration .evn file
Step 3: Run Migration
Step 4: Install Yajra DataTables Package
Step 5: Add Fake Data into Database table
Step 6: Add Datatable Ajax Route
Stpe 7: Create DataTableController
Step 8: Create Ajax Datatable Blade View
Step 9: Start Development Server
https://www.tutsmake.com/laravel-7-6-install-yajra-datatables-example-tutorial/
#laravel 6 yajra datatables #yajra datatables laravel 6 example #laravel-datatables crud #yajra datatables laravel 7 #laravel 7 datatables #yajra datatables laravel
1595288376
Highchart provides feature to draw different type of charts in our web application. Here, in this example i will let you know that how to use highchart in php application.
In this example, we will create chart using php and mysql. Actually highchart provides javascript library to create charts. We will only need to implement that library in our application.
We will need some data to generate chart, so here we will use mysql database and database query to fetch data from database.
So basucally here we will leran to implement simple dynamic column chart using highcharts library in php and ofcourse will use mysql database.
For for that, first thing we will need to create a database and tables where we will put some data. So for full example let’s follow the steps as given below.
Step 1: Create Database
Here for example, i will create a database named shopping and under this database we will need to create some tables, here i will create only two table one is to stroe customers information and another to store orders.
So run the following query in your query window.
Create customers table
CREATE TABLE IF NOT EXISTS `customers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
`email` varchar(30) NOT NULL,
`phone` varchar(15) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
Now you will to put some data into these two tables. You can put any data accoring to the column and your need. After putting data we can be able to show the chart according the the data.
Now we will need to create configuration file. So let’s create a new db configuration file **db_config.php **and put the following code into this file.
db_config.php
<?php
$dbHost = "localhost";
$dbDatabase = "shopping";
$dbUser = "root";
$dbPassword = "";
$mysqli = mysqli_connect($dbHost, $dbUser, $dbPasswrod, $dbDatabase);
?>
#php #create highchart in php #generate highchart in php #high chart using php and mysql example #highchart example #how to implement high chart in php #how to use highchart
1627450200
Hello Guys,
Today I will show you how to create laravel AJAX CRUD example tutorial. In this tutorial we are implements ajax crud operation in laravel. Also perform insert, update, delete operation using ajax in laravel 6 and also you can use this ajax crud operation in laravel 6, laravel 7. In ajax crud operation we display records in datatable.
#laravel ajax crud example tutorial #ajax crud example in laravel #laravel crud example #laravel crud example with ajax #laravel #php