Skip to content

Instantly share code, notes, and snippets.

View ajay-ag's full-sized avatar
🎯
Focusing

Ajay Gadhiya ajay-ag

🎯
Focusing
View GitHub Profile
@ajay-ag
ajay-ag / Helper.php
Last active June 12, 2020 12:10
Date Format Helpler Laravel
<?php
if(!function_exists('dateformat')){
function dateformat($date , $format=null ) {
$setting = Cache::remember('default_setting',600 ,function () {
return \DB::table('settings')->first();
});
@ajay-ag
ajay-ag / Helper.php
Last active September 10, 2020 05:28
Image Upload Helper For Laravel
<?php
use Storage;
if (!function_exists('uploadImage')) {
function uploadImage($image, $dir, $unlink = null)
{
$request = request();
$.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) {
@ajay-ag
ajay-ag / Filter.js
Created September 4, 2020 06:01
Search And Filter array for vue.js
//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(
@pixelbrackets
pixelbrackets / composer-git-auth.md
Last active February 2, 2024 08:08
Manage GitHub & GitLab Credentials in Composer

Next.js Starters

A list of CLI generators, starter kits / boilerplates and toolkits to kick start your Next.js apps.

  • What is included in this list:
    • Has ~1K+ Github stars
    • Actively maintained / up to date
    • Includes a style / css solution or UI Framework
    • Includes a database
  • Includes authentication / authorization