Dynamic Google Line Charts In Laravel 10

Google Charts can be used in Laravel 10 to create dynamic line charts. To do this, you will need to install the Google Charts package for Laravel. This package provides an easy way to integrate Google Charts into your Laravel application. Once installed, you can use the Google Charts API to create dynamic line charts. … Read more

Laravel 10 Ajax Get Request Example

In this example, we will create a simple example of ajax get request in laravel 10. 1. Create Routes First, we will create two routes for our example. One route will be used to display the view and the other route will be used to get the data from the database. Route::get(‘ajax-get-request’, ‘AjaxGetRequestController@index’); Route::get(‘ajax-get-request/data’, ‘AjaxGetRequestController@data’); … Read more

How to Override Auth Login Method in Laravel 10

1. Create a new LoginController Create a new LoginController in your app/Http/Controllers directory. This controller should extend the default Laravel Auth LoginController. 2. Override the login method In your new LoginController, override the login method. This is where you can add your custom logic for authenticating users. 3. Update the routes Update your routes file … Read more

Laravel 10 Send Email/Mail using Queue Tutorial

In this tutorial, we will learn how to send emails using queues in Laravel 10. Queues allow you to defer the processing of a time-consuming task, such as sending an email, until a later time. This allows you to speed up web requests to your application. Prerequisites Before starting this tutorial, you should have a … Read more

How to add charts in Laravel 10 using Highcharts

1. Install the Highcharts package using Composer: composer require highcharts/highcharts 2. Create a controller to handle the chart data: php artisan make:controller ChartController 3. Create a route to the controller: Route::get(‘/chart’, ‘ChartController@index’); 4. In the controller, create a method to return the chart data: public function index() { $chartData = [ ‘title’ => ‘My Chart’, … Read more

How to Call External API in Laravel

1. Use Guzzle Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services. It can be used to call external APIs in Laravel. 2. Use cURL cURL is a command line tool and library for transferring data with URLs. It can be used to … Read more

Laravel 10 PHP Guzzle Http Client POST & Get Examples

1. POST Request $client = new \GuzzleHttp\Client(); $response = $client->post(‘http://example.com/api/users’, [ ‘form_params’ => [ ‘name’ => ‘John Doe’, ’email’ => ‘[email protected]’ ] ]); 2. GET Request $client = new \GuzzleHttp\Client(); $response = $client->get(‘http://example.com/api/users’, [ ‘query’ => [ ‘name’ => ‘John Doe’, ’email’ => ‘[email protected]’ ] ]); [ad_1] Guzzle is a powerful HTTP client package that … Read more