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
df8da81d
Commit
df8da81d
authored
Jan 09, 2023
by
Siti Aisah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove allowed tags for title
parent
2bba3b15
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
69 deletions
+69
-69
app/Http/Controllers/Webprofile/Backend/AgendaController.php
+22
-22
app/Http/Controllers/Webprofile/Backend/InformationController.php
+19
-19
app/Http/Controllers/Webprofile/Backend/PageController.php
+14
-14
app/Http/Controllers/Webprofile/Backend/PostController.php
+14
-14
No files found.
app/Http/Controllers/Webprofile/Backend/AgendaController.php
View file @
df8da81d
...
@@ -80,7 +80,7 @@ class AgendaController extends Controller
...
@@ -80,7 +80,7 @@ class AgendaController extends Controller
public
function
store
(
Request
$request
)
public
function
store
(
Request
$request
)
{
{
$request
[
'content'
]
=
strip_tags
(
$request
->
content
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'tr'
,
'th'
,
'td'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content'
]
=
strip_tags
(
$request
->
content
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'tr'
,
'th'
,
'td'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
);
$request
->
validate
([
$request
->
validate
([
'title'
=>
'required'
,
'title'
=>
'required'
,
'content'
=>
'required|min:3'
,
'content'
=>
'required|min:3'
,
...
@@ -119,9 +119,9 @@ class AgendaController extends Controller
...
@@ -119,9 +119,9 @@ class AgendaController extends Controller
private
function
createEn
(
$data
,
$agenda
)
private
function
createEn
(
$data
,
$agenda
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]));
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
...
@@ -137,9 +137,9 @@ class AgendaController extends Controller
...
@@ -137,9 +137,9 @@ class AgendaController extends Controller
private
function
createDe
(
$data
,
$agenda
)
private
function
createDe
(
$data
,
$agenda
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]));
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
...
@@ -155,9 +155,9 @@ class AgendaController extends Controller
...
@@ -155,9 +155,9 @@ class AgendaController extends Controller
private
function
createSa
(
$data
,
$agenda
)
private
function
createSa
(
$data
,
$agenda
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]));
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
...
@@ -173,9 +173,9 @@ class AgendaController extends Controller
...
@@ -173,9 +173,9 @@ class AgendaController extends Controller
private
function
createZh
(
$data
,
$agenda
)
private
function
createZh
(
$data
,
$agenda
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]));
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
...
@@ -254,11 +254,11 @@ class AgendaController extends Controller
...
@@ -254,11 +254,11 @@ class AgendaController extends Controller
$request
[
'content_de'
]
=
strip_tags
(
$request
->
content_de
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_de'
]
=
strip_tags
(
$request
->
content_de
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_sa'
]
=
strip_tags
(
$request
->
content_sa
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_sa'
]
=
strip_tags
(
$request
->
content_sa
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_zh'
]
=
strip_tags
(
$request
->
content_zh
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_zh'
]
=
strip_tags
(
$request
->
content_zh
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
);
$request
[
'title_en'
]
=
strip_tags
(
$request
->
title_en
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_en'
]
=
strip_tags
(
$request
->
title_en
);
$request
[
'title_de'
]
=
strip_tags
(
$request
->
title_de
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_de'
]
=
strip_tags
(
$request
->
title_de
);
$request
[
'title_sa'
]
=
strip_tags
(
$request
->
title_sa
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_sa'
]
=
strip_tags
(
$request
->
title_sa
);
$request
[
'title_zh'
]
=
strip_tags
(
$request
->
title_zh
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_zh'
]
=
strip_tags
(
$request
->
title_zh
);
$request
->
validate
([
$request
->
validate
([
// 'title' => 'required',
// 'title' => 'required',
...
@@ -314,12 +314,12 @@ class AgendaController extends Controller
...
@@ -314,12 +314,12 @@ class AgendaController extends Controller
$dataEn
[
'content'
]
=
$data
[
'content_en'
];
$dataEn
[
'content'
]
=
$data
[
'content_en'
];
}
}
else
{
else
{
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataEn
[
'title'
]
=
$title
;
$dataEn
[
'title'
]
=
$title
;
...
@@ -337,12 +337,12 @@ class AgendaController extends Controller
...
@@ -337,12 +337,12 @@ class AgendaController extends Controller
}
}
else
{
else
{
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataDe
[
'title'
]
=
$title
;
$dataDe
[
'title'
]
=
$title
;
$dataDe
[
'content'
]
=
$content
;
$dataDe
[
'content'
]
=
$content
;
...
@@ -359,12 +359,12 @@ class AgendaController extends Controller
...
@@ -359,12 +359,12 @@ class AgendaController extends Controller
}
}
else
{
else
{
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataSa
[
'title'
]
=
$title
;
$dataSa
[
'title'
]
=
$title
;
...
@@ -382,12 +382,12 @@ class AgendaController extends Controller
...
@@ -382,12 +382,12 @@ class AgendaController extends Controller
}
}
else
{
else
{
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataZh
[
'title'
]
=
$title
;
$dataZh
[
'title'
]
=
$title
;
...
...
app/Http/Controllers/Webprofile/Backend/InformationController.php
View file @
df8da81d
...
@@ -80,7 +80,7 @@ class InformationController extends Controller
...
@@ -80,7 +80,7 @@ class InformationController extends Controller
public
function
store
(
Request
$request
)
public
function
store
(
Request
$request
)
{
{
$request
[
'content'
]
=
strip_tags
(
$request
->
content
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content'
]
=
strip_tags
(
$request
->
content
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
);
$request
->
validate
([
$request
->
validate
([
'title'
=>
'required'
,
'title'
=>
'required'
,
'content'
=>
'required|min:3'
,
'content'
=>
'required|min:3'
,
...
@@ -119,7 +119,7 @@ class InformationController extends Controller
...
@@ -119,7 +119,7 @@ class InformationController extends Controller
private
function
createEn
(
$data
,
$information
)
private
function
createEn
(
$data
,
$information
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -137,7 +137,7 @@ class InformationController extends Controller
...
@@ -137,7 +137,7 @@ class InformationController extends Controller
private
function
createDe
(
$data
,
$information
)
private
function
createDe
(
$data
,
$information
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -155,7 +155,7 @@ class InformationController extends Controller
...
@@ -155,7 +155,7 @@ class InformationController extends Controller
private
function
createSa
(
$data
,
$information
)
private
function
createSa
(
$data
,
$information
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -173,9 +173,9 @@ class InformationController extends Controller
...
@@ -173,9 +173,9 @@ class InformationController extends Controller
private
function
createZh
(
$data
,
$information
)
private
function
createZh
(
$data
,
$information
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]));
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
...
@@ -252,11 +252,11 @@ class InformationController extends Controller
...
@@ -252,11 +252,11 @@ class InformationController extends Controller
$request
[
'content_de'
]
=
strip_tags
(
$request
->
content_de
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_de'
]
=
strip_tags
(
$request
->
content_de
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_sa'
]
=
strip_tags
(
$request
->
content_sa
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_sa'
]
=
strip_tags
(
$request
->
content_sa
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_zh'
]
=
strip_tags
(
$request
->
content_zh
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_zh'
]
=
strip_tags
(
$request
->
content_zh
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
);
$request
[
'title_en'
]
=
strip_tags
(
$request
->
title_en
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_en'
]
=
strip_tags
(
$request
->
title_en
);
$request
[
'title_de'
]
=
strip_tags
(
$request
->
title_de
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_de'
]
=
strip_tags
(
$request
->
title_de
);
$request
[
'title_sa'
]
=
strip_tags
(
$request
->
title_sa
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_sa'
]
=
strip_tags
(
$request
->
title_sa
);
$request
[
'title_zh'
]
=
strip_tags
(
$request
->
title_zh
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_zh'
]
=
strip_tags
(
$request
->
title_zh
);
$request
->
validate
([
$request
->
validate
([
// 'title' => 'required',
// 'title' => 'required',
...
@@ -312,12 +312,12 @@ class InformationController extends Controller
...
@@ -312,12 +312,12 @@ class InformationController extends Controller
$dataEn
[
'content'
]
=
$data
[
'content_en'
];
$dataEn
[
'content'
]
=
$data
[
'content_en'
];
}
}
else
{
else
{
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataEn
[
'title'
]
=
$title
;
$dataEn
[
'title'
]
=
$title
;
...
@@ -334,12 +334,12 @@ class InformationController extends Controller
...
@@ -334,12 +334,12 @@ class InformationController extends Controller
$dataDe
[
'content'
]
=
$data
[
'content_de'
];
$dataDe
[
'content'
]
=
$data
[
'content_de'
];
}
}
else
{
else
{
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataDe
[
'title'
]
=
$title
;
$dataDe
[
'title'
]
=
$title
;
$dataDe
[
'content'
]
=
$content
;
$dataDe
[
'content'
]
=
$content
;
...
@@ -356,12 +356,12 @@ class InformationController extends Controller
...
@@ -356,12 +356,12 @@ class InformationController extends Controller
}
}
else
{
else
{
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataSa
[
'title'
]
=
$title
;
$dataSa
[
'title'
]
=
$title
;
...
@@ -379,12 +379,12 @@ class InformationController extends Controller
...
@@ -379,12 +379,12 @@ class InformationController extends Controller
}
}
else
{
else
{
if
(
strip_tags
(
$data
[
'content'
])
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataZh
[
'title'
]
=
$title
;
$dataZh
[
'title'
]
=
$title
;
...
...
app/Http/Controllers/Webprofile/Backend/PageController.php
View file @
df8da81d
...
@@ -81,7 +81,7 @@ class PageController extends Controller
...
@@ -81,7 +81,7 @@ class PageController extends Controller
{
{
// dd($request);
// dd($request);
$request
[
'content'
]
=
strip_tags
(
$request
->
content
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content'
]
=
strip_tags
(
$request
->
content
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
);
$request
->
validate
([
$request
->
validate
([
'title'
=>
'required'
,
'title'
=>
'required'
,
'content'
=>
'required|min:3'
,
'content'
=>
'required|min:3'
,
...
@@ -119,7 +119,7 @@ class PageController extends Controller
...
@@ -119,7 +119,7 @@ class PageController extends Controller
private
function
createEn
(
$data
,
$page
)
private
function
createEn
(
$data
,
$page
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -137,7 +137,7 @@ class PageController extends Controller
...
@@ -137,7 +137,7 @@ class PageController extends Controller
private
function
createDe
(
$data
,
$page
)
private
function
createDe
(
$data
,
$page
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -155,7 +155,7 @@ class PageController extends Controller
...
@@ -155,7 +155,7 @@ class PageController extends Controller
private
function
createSa
(
$data
,
$page
)
private
function
createSa
(
$data
,
$page
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -173,7 +173,7 @@ class PageController extends Controller
...
@@ -173,7 +173,7 @@ class PageController extends Controller
private
function
createZh
(
$data
,
$page
)
private
function
createZh
(
$data
,
$page
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -251,11 +251,11 @@ class PageController extends Controller
...
@@ -251,11 +251,11 @@ class PageController extends Controller
$request
[
'content_de'
]
=
strip_tags
(
$request
->
content_de
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_de'
]
=
strip_tags
(
$request
->
content_de
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_sa'
]
=
strip_tags
(
$request
->
content_sa
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_sa'
]
=
strip_tags
(
$request
->
content_sa
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_zh'
]
=
strip_tags
(
$request
->
content_zh
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_zh'
]
=
strip_tags
(
$request
->
content_zh
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
);
$request
[
'title_en'
]
=
strip_tags
(
$request
->
title_en
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_en'
]
=
strip_tags
(
$request
->
title_en
);
$request
[
'title_de'
]
=
strip_tags
(
$request
->
title_de
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_de'
]
=
strip_tags
(
$request
->
title_de
);
$request
[
'title_sa'
]
=
strip_tags
(
$request
->
title_sa
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_sa'
]
=
strip_tags
(
$request
->
title_sa
);
$request
[
'title_zh'
]
=
strip_tags
(
$request
->
title_zh
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_zh'
]
=
strip_tags
(
$request
->
title_zh
);
$request
->
validate
([
$request
->
validate
([
// 'title' => 'required',
// 'title' => 'required',
...
@@ -312,7 +312,7 @@ class PageController extends Controller
...
@@ -312,7 +312,7 @@ class PageController extends Controller
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataEn
[
'title'
]
=
$title
;
$dataEn
[
'title'
]
=
$title
;
...
@@ -333,7 +333,7 @@ class PageController extends Controller
...
@@ -333,7 +333,7 @@ class PageController extends Controller
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataDe
[
'title'
]
=
$title
;
$dataDe
[
'title'
]
=
$title
;
...
@@ -355,7 +355,7 @@ class PageController extends Controller
...
@@ -355,7 +355,7 @@ class PageController extends Controller
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataSa
[
'title'
]
=
$title
;
$dataSa
[
'title'
]
=
$title
;
...
@@ -377,7 +377,7 @@ class PageController extends Controller
...
@@ -377,7 +377,7 @@ class PageController extends Controller
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataZh
[
'title'
]
=
$title
;
$dataZh
[
'title'
]
=
$title
;
...
...
app/Http/Controllers/Webprofile/Backend/PostController.php
View file @
df8da81d
...
@@ -90,7 +90,7 @@ class PostController extends Controller
...
@@ -90,7 +90,7 @@ class PostController extends Controller
{
{
// dd($request);
// dd($request);
$request
[
'content'
]
=
strip_tags
(
$request
->
content
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content'
]
=
strip_tags
(
$request
->
content
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
);
$request
->
validate
([
$request
->
validate
([
'title'
=>
'required'
,
'title'
=>
'required'
,
'categories'
=>
'required'
,
'categories'
=>
'required'
,
...
@@ -227,7 +227,7 @@ class PostController extends Controller
...
@@ -227,7 +227,7 @@ class PostController extends Controller
private
function
createEn
(
$data
,
$post
)
private
function
createEn
(
$data
,
$post
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -245,7 +245,7 @@ class PostController extends Controller
...
@@ -245,7 +245,7 @@ class PostController extends Controller
private
function
createDe
(
$data
,
$post
)
private
function
createDe
(
$data
,
$post
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -263,7 +263,7 @@ class PostController extends Controller
...
@@ -263,7 +263,7 @@ class PostController extends Controller
private
function
createSa
(
$data
,
$post
)
private
function
createSa
(
$data
,
$post
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -281,7 +281,7 @@ class PostController extends Controller
...
@@ -281,7 +281,7 @@ class PostController extends Controller
private
function
createZh
(
$data
,
$post
)
private
function
createZh
(
$data
,
$post
)
{
{
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]));
if
(
$data
[
'content'
]
==
null
)
{
if
(
$data
[
'content'
]
==
null
)
{
$data
[
'content'
]
=
'kosong'
;
$data
[
'content'
]
=
'kosong'
;
...
@@ -361,11 +361,11 @@ class PostController extends Controller
...
@@ -361,11 +361,11 @@ class PostController extends Controller
$request
[
'content_de'
]
=
strip_tags
(
$request
->
content_de
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_de'
]
=
strip_tags
(
$request
->
content_de
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_sa'
]
=
strip_tags
(
$request
->
content_sa
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_sa'
]
=
strip_tags
(
$request
->
content_sa
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_zh'
]
=
strip_tags
(
$request
->
content_zh
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'content_zh'
]
=
strip_tags
(
$request
->
content_zh
,
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title'
]
=
strip_tags
(
$request
->
title
);
$request
[
'title_en'
]
=
strip_tags
(
$request
->
title_en
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_en'
]
=
strip_tags
(
$request
->
title_en
);
$request
[
'title_de'
]
=
strip_tags
(
$request
->
title_de
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_de'
]
=
strip_tags
(
$request
->
title_de
);
$request
[
'title_sa'
]
=
strip_tags
(
$request
->
title_sa
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_sa'
]
=
strip_tags
(
$request
->
title_sa
);
$request
[
'title_zh'
]
=
strip_tags
(
$request
->
title_zh
,
[
'b'
,
'i'
,
'u'
]
);
$request
[
'title_zh'
]
=
strip_tags
(
$request
->
title_zh
);
$request
->
validate
([
$request
->
validate
([
// 'title' => 'required',
// 'title' => 'required',
...
@@ -442,7 +442,7 @@ class PostController extends Controller
...
@@ -442,7 +442,7 @@ class PostController extends Controller
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGET
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
// dd($title);
// dd($title);
$dataEn
[
'title'
]
=
$title
;
$dataEn
[
'title'
]
=
$title
;
...
@@ -465,7 +465,7 @@ class PostController extends Controller
...
@@ -465,7 +465,7 @@ class PostController extends Controller
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETDE
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataDe
[
'title'
]
=
$title
;
$dataDe
[
'title'
]
=
$title
;
$dataDe
[
'content'
]
=
$content
;
$dataDe
[
'content'
]
=
$content
;
...
@@ -486,7 +486,7 @@ class PostController extends Controller
...
@@ -486,7 +486,7 @@ class PostController extends Controller
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETSA
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataSa
[
'title'
]
=
$title
;
$dataSa
[
'title'
]
=
$title
;
$dataSa
[
'content'
]
=
$content
;
$dataSa
[
'content'
]
=
$content
;
...
@@ -506,7 +506,7 @@ class PostController extends Controller
...
@@ -506,7 +506,7 @@ class PostController extends Controller
}
}
$trans
=
new
GoogleTranslate
();
$trans
=
new
GoogleTranslate
();
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]
,
[
'b'
,
'i'
,
'u'
]
));
$title
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'title'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$content
=
$trans
->
translate
(
$this
->
SOURCE
,
$this
->
TARGETZH
,
strip_tags
(
$data
[
'content'
],
[
'a'
,
'br'
,
'p'
,
'b'
,
'i'
,
'u'
,
'ul'
,
'li'
,
'ol'
,
'img'
]));
$dataZh
[
'title'
]
=
$title
;
$dataZh
[
'title'
]
=
$title
;
$dataZh
[
'content'
]
=
$content
;
$dataZh
[
'content'
]
=
$content
;
...
...
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