This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//productList = array of object | |
let productList = [{ | |
Price: 500 , ProductName : "Test" | |
},{ | |
Price: 200 , ProductName : "Test -2" | |
}]; | |
if (this.searchKey != "") { | |
productList = this.products.filter((post) => { | |
return post.ProductName.toLowerCase().includes( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$.fn.serializeObject = function () { | |
var self = this, | |
json = {}, | |
push_counters = {}, | |
patterns = { | |
"validate": /^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/, | |
"key": /[a-zA-Z0-9_]+|(?=\[\])/g, | |
"push": /^$/, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.validator.addMethod("pan", function (value, element) { | |
return this.optional(element) || /^[A-Z]{5}\d{4}[A-Z]{1}$/.test(value); | |
}, "Please enter a valid PAN"); | |
$.validator.addMethod("gst", function (value, element) { | |
return this.optional(element) || /^([0]{1}[1-9]{1}|[1-2]{1}[0-9]{1}|[3]{1}[0-7]{1})([a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9a-zA-Z]{1}[zZ]{1}[0-9a-zA-Z]{1})+$/.test(value); | |
}, "Please enter a valid GST No"); | |
$.validator.addMethod('filesize', function (value, element, param) { | |
if (element.files.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Storage; | |
if (!function_exists('uploadImage')) { | |
function uploadImage($image, $dir, $unlink = null) | |
{ | |
$request = request(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!function_exists('dateformat')){ | |
function dateformat($date , $format=null ) { | |
$setting = Cache::remember('default_setting',600 ,function () { | |
return \DB::table('settings')->first(); | |
}); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container-fluid"> | |
<div class="row"> | |
<!-- /.col-md-6 --> | |
<div class="col-lg-12"> | |
<div class="card"> | |
<div class="card-body"> | |
<div class="row" id="laravelPagination" data-url="{{ route('country.page') }}" x-data="laravelPagination()" | |
x-init="init()"> | |
<template x-for="item in country" :key="item.id"> | |
<div class="card col-12 mb-3"> |