Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Building Something Great

Inifnitbility infinitbility

🎯
Building Something Great
View GitHub Profile
@infinitbility
infinitbility / debug.php
Last active Feb 5, 2021
Cakephp best way to show array Or print array
View debug.php
<?php
# print array in cakephp framework
debug($array);exit;
?>
@infinitbility
infinitbility / react-native-tutorial.md
Last active Feb 10, 2021
Learn React Native basics to advance
View react-native-tutorial.md
View MIGS-VPC-integration.php
<?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
View PhpInArray.php
<?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
View javascript-indexOf.js
//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
View userlist.blade.php
<!-- Your Files -->
// @include('layout.navBar')
// @include('layout.sideBar')
<!-- Page wrapper -->
<!-- ============================================================== -->
<div class="page-wrapper">
<!-- ============================================================== -->
<!-- Bread crumb and right sidebar toggle -->
<!-- ============================================================== -->
View CssAndJsfiles.html
<!-- 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 Jun 25, 2020
Datatable controller example
View UserController.php
<?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 Jun 1, 2020
Parent controller for calling function from another controller
View ParentController.php
<?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 Jun 1, 2020
Child controller for calling function from another controller
View ChildController.php
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ChildController extends Controller
{