Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webprofile-jwg2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
webprofile-jwg2024
Commits
45aadf57
Commit
45aadf57
authored
Nov 30, 2020
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jika sudah ada berita kategori tidak bisa dihapus
parent
f8a698ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
app/Http/Controllers/Webprofile/Backend/CategoryController.php
+5
-5
No files found.
app/Http/Controllers/Webprofile/Backend/CategoryController.php
View file @
45aadf57
...
...
@@ -2,10 +2,10 @@
namespace
App\Http\Controllers\Webprofile\Backend
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\Controller
;
use
App\Repositories\Webprofile\CategoryRepository
;
use
App\Repositories\Webprofile\En\CategoryRepository
as
EnCategoryRepository
;
use
Illuminate\Http\Request
;
use
Statickidz\GoogleTranslate
;
class
CategoryController
extends
Controller
...
...
@@ -53,8 +53,6 @@ class CategoryController extends Controller
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
public
function
store
(
Request
$request
)
...
...
@@ -113,7 +111,6 @@ class CategoryController extends Controller
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
*
* @return \Illuminate\Http\Response
...
...
@@ -149,12 +146,15 @@ class CategoryController extends Controller
*/
public
function
destroy
(
$id
)
{
$data
=
$this
->
repo
->
findId
(
$id
,
[
'rEn'
]);
$data
=
$this
->
repo
->
findId
(
$id
,
[
'rEn'
,
'berita'
]);
if
(
!
$data
->
berita
)
{
$this
->
repo
->
destroy
(
$data
);
if
(
$data
->
rEn
)
{
$this
->
repoEn
->
destroy
(
$data
->
rEn
);
}
}
return
response
()
->
json
([
'done'
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment