Skip to content

Instantly share code, notes, and snippets.

View infinitbility's full-sized avatar
🎯
Building Something Great

Inifnitbility infinitbility

🎯
Building Something Great
View GitHub Profile
@infinitbility
infinitbility / debug.php
Last active February 5, 2021 17:22
Cakephp best way to show array Or print array
<?php
# print array in cakephp framework
debug($array);exit;
?>
@infinitbility
infinitbility / react-native-tutorial.md
Last active June 23, 2021 04:02
Learn React Native basics to advance
<?php
# credentials
$url = VPC_URL; // https://migs.mastercard.co.in/vpcpay or https://migs.mastercard.com/vpcpay
$merchantId = MERCHANT_ID; //value get from your bank
$accessCode = ACCESS_CODE; //value get from your bank
$SECURE_SECRET = SECURE_SECRET; //value get from your bank
$baseURL = "localhost/migs";
# amount
<?php
# inArray example
$fruits = ['Banana', 'Blackcurrant', 'Blueberry', 'Chili pepper', 'Cranberry', 'Eggplant', 'Gooseberry'];
# You get true or false
$result = in_array("Blueberry", $fruits);
# output true
# if value not available
//indexOf example
var fruits = ['Banana', 'Blackcurrant', 'Blueberry', 'Chili pepper', 'Cranberry', 'Eggplant', 'Gooseberry'];
// You get their index ( Key )
var index = fruits.indexOf('Blueberry');
// output 2
// if value not available
var index = fruits.indexOf('Apple');
// output -1
<!-- Your Files -->
// @include('layout.navBar')
// @include('layout.sideBar')
<!-- Page wrapper -->
<!-- ============================================================== -->
<div class="page-wrapper">
<!-- ============================================================== -->
<!-- Bread crumb and right sidebar toggle -->
<!-- ============================================================== -->
<!-- CSS FILES LIST -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" />
<link href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css" rel="stylesheet">
<!-- JS FILES LIST -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
@infinitbility
infinitbility / UserController.php
Created June 25, 2020 14:39
Datatable controller example
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\User;
use Auth;
use Hash;
use Illuminate\Http\Request;
use Yajra\Datatables\Datatables;
@infinitbility
infinitbility / ParentController.php
Created June 1, 2020 16:17
Parent controller for calling function from another controller
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Controllers\ChildController;
class ParentController extends Controller
{
@infinitbility
infinitbility / ChildController.php
Created June 1, 2020 16:17
Child controller for calling function from another controller
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ChildController extends Controller
{