-
Notifications
You must be signed in to change notification settings - Fork 0
/
php_imp_code.php
45 lines (41 loc) · 1.44 KB
/
php_imp_code.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//use to convert string special charecter in html intity
htmlspecialchars($str, ENT_QUOTES)
//use to convert string special charecter in html intity
//-----------------------------------------------------
.package-content ul li:before {
content: '✔ ';
margin-left: -20px;
color: #f05d45;
}
//-----------------------------------------------------
n level dropdown
---------------------
function nlevelcat($parent_id,$level = Null, $prefix = '') {
$catdata = array();
$data = ProductCategory::orderBy('title')->where(['parent_id'=>$level,'status'=>1])->get();
$category = '';
if (count($data) > 0) {
foreach ($data as $row) {
if($parent_id == $row->id){
$check = "selected";
}else{
$check = "";
}
$category .= "<option value='$row->id' ".$check.">".$prefix . $row->title."</option>";
$category .= nlevelcat($parent_id,$row->id, $prefix . ' - ');
}
}
return $category;
}
//-------------------------------------------------------------
Route group
------------
Route::group(['prefix' => 'post'], function(){
Route::get('all','Controller@post');
Route::get('user','Controller@post');
})
Route::group(['prefix' => 'post', 'middleware' => ['auth']], function(){
Route::get('all','Controller@post');
Route::get('user','Controller@post');
})
-------------------------------------------------------------------