From a11aa914204af559f3397ce526cd0eabbc183ec9 Mon Sep 17 00:00:00 2001 From: Torsten Schneider Date: Fri, 26 Feb 2021 07:49:45 +0100 Subject: [PATCH] Searching for SunEditor object for .getContents() into formarea value for submit --- .../app/Http/Controllers/AdminController.php | 1 + motorradig/resources/js/app.js | 2 +- motorradig/resources/js/suneditor.js | 2 -- .../resources/views/admin/edit_home.blade.php | 31 +++++++++++++++++-- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/motorradig/app/Http/Controllers/AdminController.php b/motorradig/app/Http/Controllers/AdminController.php index bba4a2a..a8807a6 100644 --- a/motorradig/app/Http/Controllers/AdminController.php +++ b/motorradig/app/Http/Controllers/AdminController.php @@ -59,6 +59,7 @@ class AdminController extends Controller return view('admin.edit_home')->with('content',$page->content); } public function store_home(Request $request) { + dd($request); $request->validate( [ 'pagecontent' => 'required' diff --git a/motorradig/resources/js/app.js b/motorradig/resources/js/app.js index f82e334..7380882 100644 --- a/motorradig/resources/js/app.js +++ b/motorradig/resources/js/app.js @@ -5,4 +5,4 @@ */ require('./bootstrap'); -require('./suneditor') +require('./suneditor'); diff --git a/motorradig/resources/js/suneditor.js b/motorradig/resources/js/suneditor.js index 7d3b595..ed9fbc9 100644 --- a/motorradig/resources/js/suneditor.js +++ b/motorradig/resources/js/suneditor.js @@ -1,5 +1,3 @@ - - import 'suneditor/dist/css/suneditor.min.css' import suneditor from 'suneditor' import plugins from 'suneditor/src/plugins' diff --git a/motorradig/resources/views/admin/edit_home.blade.php b/motorradig/resources/views/admin/edit_home.blade.php index eec0ff8..170fa9c 100644 --- a/motorradig/resources/views/admin/edit_home.blade.php +++ b/motorradig/resources/views/admin/edit_home.blade.php @@ -10,12 +10,20 @@
-
+ @csrf
- --}} + + +
@if(Auth::user()->role=="ADMIN") @@ -30,4 +38,23 @@
+ + @endsection