added delete button for clipart
This commit is contained in:
@@ -216,6 +216,14 @@ class AdminModel extends Model
|
||||
return $i;
|
||||
}
|
||||
|
||||
function deleteClipart($id){
|
||||
|
||||
$i = DB::table('cliparts')
|
||||
->where("Id", $id)
|
||||
->delete();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function updateClipartCategory($id, $data){
|
||||
|
||||
$i = DB::table('clipart_categories')
|
||||
@@ -226,10 +234,13 @@ class AdminModel extends Model
|
||||
|
||||
function selectCliparts(){
|
||||
|
||||
$i = DB::table('cliparts')
|
||||
->orderby("Id", "DESC")
|
||||
->paginate(16);
|
||||
$i = DB::table('cliparts')->select('cliparts.*', 'clipart_categories.CategoryName')
|
||||
->leftjoin('clipart_categories', 'clipart_categories.Id','=','cliparts.CategoryId')
|
||||
->orderby("Id", "DESC")
|
||||
->paginate(16);
|
||||
return $i;
|
||||
|
||||
|
||||
}
|
||||
|
||||
function selectSports(){
|
||||
|
||||
Reference in New Issue
Block a user