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 / file.sql
Created December 6, 2022 09:04
Sql qUERY
/*CREATE TABLE posts (
id int NOT NULL,
title varchar(255) NOT NULL,
PRIMARY KEY (id)
);*/
/*CREATE TABLE view_table (
id int NOT NULL,
post_id int NOT null,
view_col int default 0
<html>
<head>
<title>Disable Back Button in Browser - Online Demo</title>
<style type="text/css">
body, input {
font-family: Calibri, Arial;
}
</style>
<script type="text/javascript">
window.history.forward();
@arif98741
arif98741 / centos7-nginx-laravel-configuration
Created November 26, 2022 21:25 — forked from breekoy/centos7-nginx-laravel-configuration
Configuration steps on CentOS7 server to run Laravel applications + Redis and Node.JS on nginx
==== CENTOS 7 LEMP STACK INSTALLATION ====
0. Make sure the centos 7 server have internet connection
1. Install the EPEL Repository
sudo yum -y install epel-release
2. Install the Remi Repository
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
3. Install Nginx
@arif98741
arif98741 / quarter date carbon.php
Last active November 17, 2022 10:06
This is a file of r & d for starting date of current quarter, ending date of current quarter , starting date of previous quarter , ending date of previous quarter.
<?php
echo "start of current quarter date: ";
$startofQuarter = Carbon::now()->startOfQuarter();
echo $startofQuarter;
echo "\n";
echo "end of current quarter date: ";
$startofQuarter = Carbon::now()->endOfQuarter();
echo $startofQuarter;
echo "\n";
@arif98741
arif98741 / CustomRoute.php
Last active November 9, 2022 07:15
Custom Route Facades in Laravel along with Route.php
<?php
//app/Facades/CustomRoute.php
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
/**
* @method static \Illuminate\Routing\PendingResourceRegistration apiResource(string $name, string $controller, array $options = [])
* @method static \Illuminate\Routing\PendingResourceRegistration resource(string $name, string $controller, array $options = [])
* @method static \Illuminate\Routing\Route any(string $uri, array|string|callable|null $action = null)
@arif98741
arif98741 / AuthController.php
Last active November 7, 2022 10:36
Api\AuthController
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
@arif98741
arif98741 / mysql query.sql
Last active November 2, 2022 12:00
query database
show tables;
select * from orders;
select * from orders order by orders_id desc limit 5;
-- MySQL dump 10.13 Distrib 5.7.33, for Win64 (x86_64)
--
-- Host: localhost Database: student
-- ------------------------------------------------------
-- Server version 5.7.33
@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": "lk@lk.com",
"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;