This file contains 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-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> | |
</head> | |
<body> | |
<form action=""> | |
Name: <input type="text" name="name" id="name"/><br/> |
This file contains 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-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Jquery sortable serialize</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> | |
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> | |
</head> | |
<body> | |
<div class="content-wrapper"> |
This file contains 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-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Jquery sortable serialize</title> | |
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> | |
<style> | |
.ui-widget.ui-widget-content{max-height: 500px; overflow-y: scroll; overflow-x: hidden;} | |
.item{list-style: none; background: lightgray; padding: 5px; margin: 2px 0; width: 500px; cursor: move;} |
This file contains 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 | |
$arr = [100, 200, 300, 400, 500]; // An array containing some values | |
$new_arr = [2 => 1001]; // Take a new array with a key where we want to keep the value | |
array_splice($arr, 2, 1, $new_arr); // array_splice(old_array, position_from_where_to_start, no_of_element_of_new_array, new_array) | |
print_r($arr); |
This file contains 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
// There are two ways... | |
// No:1....... | |
$(function() { | |
$('#category').change(function() { | |
var cat = $(this).val(); | |
$.get('{{ url("categories") }}', {'cat_id': cat}, function (data) { | |
$('#subcategory').empty(); | |
$.each(data, function(key, value) { |
This file contains 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 | |
// Date time difference | |
$dt = date_diff(date_create('2017-01-01 02:20:10'), date_create('2017-02-01 23:23:23')); | |
var_dump($dt); | |
// Date difference | |
$d = date_diff(date_create('2017-01-01'), date_create('2017-02-01')); | |
var_dump($d); |
This file contains 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 | |
public function test(){ | |
$days = new Carbon(); | |
$bn_contents = BnContent::with('category','subcategory','content_meta') | |
->leftJoin('bn_content_metas', 'bn_contents.content_id', '=', 'bn_content_metas.content_id') | |
->where('bn_contents.created_at', '<', $days->subDays(7)->toDateTimeString()) | |
->where('bn_contents.status', 1)->where('bn_contents.deletable', 1) | |
->orderBy('bn_content_metas.total_hit','desc')->take(5)->get(); | |
return ($bn_contents); |
This file contains 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
Clear all view, route, config and cache | |
Upload the project in live server | |
After that upload the dot prefixed files in the live server |
This file contains 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
<!--Pass the url and id in input field--> | |
<input type="text" value="{{ config('app.url').config('appconfig.contentImagePath').$photo->img_path }}" id="url-{{ $photo->id }}" class="form-control" readonly> | |
<!--Pass the id in onclick button--> | |
<button type="button" onclick="copyUrl({{ $photo->id }})" class="btn btn-primary">Copy</button> | |
<!--The javascript code--> | |
<script> | |
function copyUrl(id){ | |
//alert('hello'); |
This file contains 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
//make a class... | |
class BanglaDate | |
{ | |
private $timestamp; //timestamp as input | |
private $morning; //when the date will change? | |
private $engHour; //Current hour of English Date | |
private $engDate; //Current date of English Date | |
private $engMonth; //Current month of English Date | |
private $engYear; //Current year of English Date |
OlderNewer