Skip to content

Instantly share code, notes, and snippets.

View arif98741's full-sized avatar
🏠
Actively Working

Ariful Islam arif98741

🏠
Actively Working
View GitHub Profile
@arif98741
arif98741 / providerlist.json
Created October 30, 2022 22:00
Available Provider List as Json
{
"success": true,
"message": "Fetched user according to given status",
"data": [
{
"id": 81,
"full_name": "AGM Khair Sabbir",
"email": "[email protected]",
"phone": "01733333333",
"gender": "Male",
@arif98741
arif98741 / ekpay.php
Last active October 26, 2022 10:06
data
//ekpay old code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://dev.ekpay.gov.bd/syndicate/api/fetch-MDMbillers',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
@arif98741
arif98741 / PaginatorClass.php
Last active October 19, 2022 13:46
This is a paginator class for generating your paginated collections from your given collections. You don't need to touch it. Your main target is to generate two collections, merge both of them and finally make a pagination.
<?php
namespace App\Http\Controllers;
use Illuminate\Container\Container;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Collection;
@arif98741
arif98741 / attendance_query.sql
Last active January 30, 2025 06:00
Attendance Table view QUery by Column and Row MySQL
SET @sql = NULL;
SET SESSION group_concat_max_len = 1000000;
SELECT
GROUP_CONCAT(DISTINCT
CONCAT(
'max(CASE WHEN ca.date = ''',
date_format(date, '%Y-%m-%d'),
''' THEN coalesce(p.status, ''P'') END) AS `',
date_format(date, '%Y-%m-%d'), '`'
@arif98741
arif98741 / Expense
Last active September 28, 2022 20:21
Showing Data in Table as Groupwise. Its just group by after getting all data and row, colspan technique
function expenseList()
{
$user_info = Expenses::get()->groupBy(function($val) {
return Carbon::parse($val->current_month)->format('F');
});
return view('expense-list', compact('user_info'));
}
@arif98741
arif98741 / Install Xdebug in PHP
Last active October 16, 2023 08:00
Debugging Configuration in PHPSTROM XDEBUG
Install Xdebug in PHP
Now it’s time to install Xdebug in PHP. There are a few options through which you can install Xdebug.
Windows:
For windows users, Xdebug is providing a wizard tool through which you can download the related .dll file. For this, first, create a PHP file in folder, and add the following line of code:
<?php
phpinfo();
?>
@arif98741
arif98741 / s3.php
Created September 18, 2022 17:18
Store Image using S3
if (config('app.env') == 'production') {
$width = $thumbnail_values[1]->value;
$height = $thumbnail_values[0]->value;
$destinationPath = 'images/media/' . $directory . '/';
$thumbnailImage = Image::make($request->file('file'))->resize($width, $height)->stream();
$namethumbnail = $destinationPath . 'thumbnail' . time() . $filename;
Storage::disk('s3')->put($destinationPath . 'thumbnail' . time() . $filename, $thumbnailImage->__toString());
$Path = 'images/media/' . $directory . '/' . 'thumbnail' . time() . $filename;
@arif98741
arif98741 / single-order-json.json
Created September 13, 2022 08:34
Single Order Json
{
"status": "success",
"code": 200,
"orders": {
"orders_data": [
{
"orders_id": 92,
"orders_numbers": "00000092",
"total_tax": "188.00",
"customers_id": 60,
/**
* @var PaymentInterface
*/
public static $provider;
/**
* @var
*/
private static $instance;
@arif98741
arif98741 / test
Last active July 28, 2022 12:45
Get PRoduct and Details all Related to Products
[
{
"categories_id": 2,
"category_name": "Women",
"category_description": null,
"categories_image": 36,
"categories_icon": 584,
"size_chart": "images/media/2022/03/HsD6r21410.webp",
"parent_id": 0,
"sort_order": null,