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 | |
function removeEmailAndPhoneFromString($string) { | |
// remove email | |
$string = preg_replace('/([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)/', '*****', $string); | |
// remove phone | |
$string = preg_replace('/([0-9]+[\- ]?[0-9]+){4,}/', '*****', $string); | |
return $string; |
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 | |
function imageUploadHandler($file, $fileName = null, $request_path = 'default', $disk = 'public', $size = null, $old_file = null) | |
{ | |
// If old file exist then delete it | |
if (!is_null($old_file)) { | |
if (Storage::disk($disk)->exists($old_file)) { | |
Storage::disk($disk)->delete($old_file); | |
} | |
} |
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 | |
// Get file from storage folder | |
if (!function_exists('storageLink')) { | |
function storageLink($url, $disk = 'public', $type = 'default') | |
{ | |
if (Storage::disk($disk)->exists($url)) { | |
if ($disk == 's3') { | |
return Storage::disk($disk)->temporaryUrl($url, now()->addMinute()); | |
} else { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="google-reviews"></div> |
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 imageUploadHandler($image, $request_path = 'default', $size = null, $old_image = null) | |
{ | |
if (isset($old_image)) { | |
if (Storage::disk('public')->exists($old_image)) { | |
Storage::disk('public')->delete($old_image); | |
} | |
} | |
$path = $image->store($request_path, 'public'); |
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
<template> | |
<nav aria-label="..."> | |
<ul class="pagination justify-content-center"> | |
<li style="cursor: pointer;" class="page-item" :class="{ disabled: pagination.current_page <= 1 }"> | |
<a class="page-link" @click.prevent="changePage(1)" >First page</a> | |
</li> | |
<li style="cursor: pointer;" class="page-item" :class="{ disabled: pagination.current_page <= 1 }"> | |
<a class="page-link" @click.prevent="changePage(pagination.current_page - 1)">Previous</a> | |
</li> |
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
<template> | |
<div class="customer"> | |
<div class="row justify-content-center"> | |
<div class="col-md-12"> | |
<div class="card"> | |
<div class="card-header"> | |
<h3 class="card-title">Customers</h3> | |
<div class="card-tools" style="position: absolute;right:1rem;top:.5rem;"> | |
<button @click="create" type="button" class="btn btn-info"> | |
Add New <i class="fas fa-plus"></i> |
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
Domain Url - https://vuedataviewer.mishajib.me | |
Get Data url (get) - /api/customers?page=1 | |
Search Data url (get) - /api/search/customers/{fieldname}/{query}?page=1 | |
Store data url (post) - /api/customers | |
Update data url (put) - /api/customers/{customer} | |
Destroy / Remove data url (delete) - /api/customers/{customer} |
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
/^(?:\+88|88)?(01[3-9]\d{8})$/ |
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
1. First Install @babel/plugin-syntax-dynamic-import plugin - npm install --save-dev @babel/plugin-syntax-dynamic-import . | |
2. Create .babelrc file into root folder. | |
3. Placed this code into .babelrc file - | |
{ | |
"plugins": [ | |
"@babel/plugin-syntax-dynamic-import" | |
] | |
} | |
4. In the mix file replace previous code by this code - | |
mix.js('resources/js/app.js', 'public/js').webpackConfig({ |