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
/* | |
"react-dnd": "^5.0.0", | |
"react-dnd-html5-backend": "^3.0.2", | |
"react-beautiful-dnd": "^13.0.0", | |
*/ | |
import { DragDropContext, Draggable, Droppable } from "react-beautiful-dnd"; | |
function PopularTags({ | |
tags, | |
existingPopularTag, |
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
from bs4 import BeautifulSoup | |
import wget | |
import requests | |
import os | |
url = 'http://canvas.projekti.info/laracast/%20Intermediate%20Laravel/' | |
ext = 'mp4' | |
destinationFolder = "/home/mehedi/Downloads/intermediate_laravel/" | |
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
function getDatatable(parameter = null) { | |
var token = $('input[name="_token"]').val(); | |
$('#datatable').DataTable({ | |
iDisplayLength: 25, | |
processing: true, | |
serverSide: true, | |
searching: true, | |
ajax: { |
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
$variable = Modal::where(function ($query) use ($info) { | |
$query->where('column_one', $info) | |
->orWhere('column_two', $info) | |
->orWhere('status', 3); | |
}) | |
->where('deleted', 0) | |
->first(); |
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
Model::leftJoin('dummy_table', 'dummy_table.id', '=', 'mock_table.foreign_key') | |
->where('dummy_table.status', 1) | |
->where(function ($query) { | |
$users = Auth::user()->id; | |
if ($users == '12') { | |
$query->where('dummy_table.created_by', '=', Auth::user()->id) | |
->where('dummy_table.user_group', 'user'); | |
} else if (in_array($users, [1, 4, 6])) { | |
$query->whereIn('dummy_table.created_by', [1, 4, 6]); | |
} else { |
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
mysql> select * from product_category; | |
+-----------+----------------+---------------------+ | |
| id | category_id | product_id | | |
+-----------+----------------+---------------------+ | |
| 1 | 1 | 2 | | |
| 2 | 2 | 2 | | |
| 3 | 3 | 2 | | |
| 4 | 2 | 3 | | |
| 5 | 2 | 4 | | |
| 6 | 3 | 4 |