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
88445195
Commit
88445195
authored
Nov 27, 2020
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto translate page dan post harus karakter kurang dari 5000
parent
de76d064
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
app/Http/Controllers/Webprofile/Backend/PageController.php
+5
-6
app/Http/Controllers/Webprofile/Backend/PostController.php
+3
-1
No files found.
app/Http/Controllers/Webprofile/Backend/PageController.php
View file @
88445195
...
...
@@ -2,11 +2,11 @@
namespace
App\Http\Controllers\Webprofile\Backend
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\Controller
;
use
App\Models\Webprofile\Categories
;
use
App\Repositories\Webprofile\En\PagesRepository
as
EnPagesRepository
;
use
App\Repositories\Webprofile\PagesRepository
;
use
Illuminate\Http\Request
;
use
Statickidz\GoogleTranslate
;
class
PageController
extends
Controller
...
...
@@ -60,8 +60,6 @@ class PageController extends Controller
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
public
function
store
(
Request
$request
)
...
...
@@ -73,7 +71,9 @@ class PageController extends Controller
if
(
webprofilesetting
()[
'auto_translate'
]
==
1
)
{
// save translate
$this
->
createEn
(
$data
,
$save
);
if
(
strlen
(
$fields
[
'q'
])
<
5000
)
{
$this
->
createEn
(
$data
,
$save
);
}
}
return
redirect
()
->
route
(
'pages.index'
);
...
...
@@ -131,8 +131,7 @@ class PageController extends Controller
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @param int $id
*
* @return \Illuminate\Http\Response
*/
...
...
app/Http/Controllers/Webprofile/Backend/PostController.php
View file @
88445195
...
...
@@ -91,7 +91,9 @@ class PostController extends Controller
if
(
webprofilesetting
()[
'auto_translate'
]
==
1
)
{
// save translate
$this
->
createEn
(
$data
,
$save
);
if
(
strlen
(
$fields
[
'q'
])
<
5000
)
{
$this
->
createEn
(
$data
,
$save
);
}
}
$this
->
share
(
$data
,
$request
);
...
...
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