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 canonical_url() | |
{ | |
if (\Illuminate\Support\Str::startsWith($current = url()->current(), 'https://www')) { | |
return str_replace('https://www.', 'https://', $current); | |
} | |
return str_replace('https://', 'https://www.', $current); | |
} |
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
Dropzone.options.placeholderfForm = { | |
dictDefaultMessage: "{{__('Drag or Select Your Image')}}", | |
maxFiles: 50, | |
maxFilesize: 30720, //MB | |
chunking: true, | |
chunkSize: 10000000, // 10MB | |
acceptedFiles: 'image/*,video/*,.mp4,.avi,.flv,.mov', | |
success: function (file, response) { | |
if (file.previewElement) { | |
return file.previewElement.classList.add("dz-success"); |
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 converToSlug(slug){ | |
let finalSlug = slug.replace(/[^a-zA-Z0-9]/g, ' '); | |
//remove multiple space to single | |
finalSlug = slug.replace(/ +/g, ' '); | |
// remove all white spaces single or multiple spaces | |
finalSlug = slug.replace(/\s/g, '-').toLowerCase().replace(/[^\w-]+/g, '-'); | |
return finalSlug; | |
} | |
console.log(makeSlug("Car Cleaning Service From Best Cleaner [] () !@#$%^&*()_+)) |
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
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> |
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
<style> | |
@font-face { | |
font-family: 'THSarabunNew'; | |
font-style: normal; | |
font-weight: normal; | |
src: url("{{ asset('assets/frontend/fonts/THSarabunNew.ttf') }}") format('truetype'); | |
} | |
body { | |
font-family: "THSarabunNew"; | |
} |
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 make_links($str){ | |
$pattern = '(?xi)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))'; | |
return preg_replace_callback("#$pattern#i", function($matches) { | |
$input = $matches[0]; | |
$url = preg_match('!^https?://!i', $input) ? $input : "http://$input"; | |
return '<a href="' . $url . '" rel="nofollow" target="_blank">' . "$input</a>"; | |
}, $str); | |
} |
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 rmdir_recursive($dir) { | |
foreach(scandir($dir) as $file) { | |
if ('.' === $file || '..' === $file) continue; | |
if (is_dir("$dir/$file")) rmdir_recursive("$dir/$file"); | |
else unlink("$dir/$file"); | |
} | |
rmdir($dir); | |
} |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ | |
RewriteRule ^(.*) - [E=BASE:%1] |
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
#makrup | |
<div class="volunteer-area m-top-02"> | |
<div class="container"> | |
<div class="row no-gutters"> | |
<div class="col-lg-12"> | |
<ul class="volunteer-single-item-list"> | |
<li class="volunteer-single-item"> | |
<div class="content less-padding style-01"> | |
<div class="icon"> |
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 | |
namespace App\Http\Middleware; | |
use Closure; | |
class CorsMiddleware | |
{ | |
/** | |
* Handle an incoming request. | |
* |