diff --git a/app/Http/Controllers/NotisController.php b/app/Http/Controllers/NotisController.php index 098053c6..c0be590b 100644 --- a/app/Http/Controllers/NotisController.php +++ b/app/Http/Controllers/NotisController.php @@ -17,6 +17,7 @@ use App\Models\Resit; use App\Models\Gadai; use App\Models\Daerah; use App\Models\Negeri; +use App\Models\Tetapan; use Carbon\Carbon; use PDF; use DateTime; @@ -25,6 +26,7 @@ use Excel; + class NotisController extends Controller { /** @@ -158,9 +160,33 @@ class NotisController extends Controller + } + + + Public function kemaskininotis(Request $request){ + + + $tetapan = Tetapan::where('id','=',1)->first(); + // dd($tetapan); + + return view('jananotis.kemaskininotis',compact('tetapan')); + + } + + public function store(Request $request) + { + //create tetapan + $tetapan = Tetapan::find(1); + + $tetapan->para2 = $request->para2; + $tetapan->update(); + return redirect()->route('jananotis.kemaskininotis') + ->with('success','Kemaskini Berjaya'); + + } } diff --git a/composer.json b/composer.json index 6fb524f9..fdb3a6af 100644 --- a/composer.json +++ b/composer.json @@ -7,6 +7,7 @@ "require": { "php": "^7.3|^8.0", "barryvdh/laravel-dompdf": "^0.9.0", + "ckeditor/ckeditor": "^4.19", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.4", "intervention/image": "^2.7", @@ -14,6 +15,7 @@ "laravel/framework": "^8.65", "laravel/sanctum": "^2.13", "laravel/tinker": "^2.5", + "laravelcollective/html": "^6.3", "php-http/guzzle7-adapter": "^1.0", "pusher/pusher-php-server": "^7.0", "spatie/laravel-permission": "^5.3" diff --git a/composer.lock b/composer.lock index 766ef0da..86f42fdd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1f26af21cdf299942137e16bdee7fbea", + "content-hash": "f73b484268370b115dbf98bbd27f6a22", "packages": [ { "name": "asm89/stack-cors", @@ -188,6 +188,54 @@ ], "time": "2021-08-15T20:50:18+00:00" }, + { + "name": "ckeditor/ckeditor", + "version": "4.19.0", + "source": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor4-releases.git", + "reference": "db9342ad88e04de66dcf9b132ff41061727778c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ckeditor/ckeditor4-releases/zipball/db9342ad88e04de66dcf9b132ff41061727778c5", + "reference": "db9342ad88e04de66dcf9b132ff41061727778c5", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+", + "LGPL-2.1+", + "MPL-1.1+" + ], + "authors": [ + { + "name": "CKSource", + "homepage": "https://cksource.com" + } + ], + "description": "JavaScript WYSIWYG web text editor.", + "homepage": "https://ckeditor.com/ckeditor-4/", + "keywords": [ + "CKEditor", + "ckeditor4", + "editor", + "fckeditor", + "html", + "javascript", + "richtext", + "text", + "wysiwyg" + ], + "support": { + "forum": "https://stackoverflow.com/tags/ckeditor", + "issues": "https://github.com/ckeditor/ckeditor4/issues", + "source": "https://github.com/ckeditor/ckeditor4", + "wiki": "https://ckeditor.com/docs/ckeditor4/latest/" + }, + "time": "2022-05-18T10:49:44+00:00" + }, { "name": "clue/stream-filter", "version": "v1.6.0", @@ -1831,6 +1879,78 @@ }, "time": "2021-09-28T15:47:34+00:00" }, + { + "name": "laravelcollective/html", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/LaravelCollective/html.git", + "reference": "78c3cb516ac9e6d3d76cad9191f81d217302dea6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/78c3cb516ac9e6d3d76cad9191f81d217302dea6", + "reference": "78c3cb516ac9e6d3d76cad9191f81d217302dea6", + "shasum": "" + }, + "require": { + "illuminate/http": "^6.0|^7.0|^8.0|^9.0", + "illuminate/routing": "^6.0|^7.0|^8.0|^9.0", + "illuminate/session": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "illuminate/view": "^6.0|^7.0|^8.0|^9.0", + "php": ">=7.2.5" + }, + "require-dev": { + "illuminate/database": "^6.0|^7.0|^8.0|^9.0", + "mockery/mockery": "~1.0", + "phpunit/phpunit": "~8.5|^9.5.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + }, + "laravel": { + "providers": [ + "Collective\\Html\\HtmlServiceProvider" + ], + "aliases": { + "Form": "Collective\\Html\\FormFacade", + "Html": "Collective\\Html\\HtmlFacade" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Collective\\Html\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adam Engebretson", + "email": "adam@laravelcollective.com" + }, + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "HTML and Form Builders for the Laravel Framework", + "homepage": "https://laravelcollective.com", + "support": { + "issues": "https://github.com/LaravelCollective/html/issues", + "source": "https://github.com/LaravelCollective/html" + }, + "time": "2022-02-08T21:02:54+00:00" + }, { "name": "laravie/codex", "version": "v5.3.3", diff --git a/config/app.php b/config/app.php index edd35c19..d017dd58 100644 --- a/config/app.php +++ b/config/app.php @@ -176,6 +176,10 @@ return [ App\Providers\RouteServiceProvider::class, Barryvdh\DomPDF\ServiceProvider::class, + //form + Collective\Html\HtmlServiceProvider::class, + + ], /* @@ -233,6 +237,9 @@ return [ 'PDF' => Barryvdh\DomPDF\Facade::class, 'Input' => Illuminate\Support\Facades\Input::class, + 'Form' => Collective\Html\FormFacade::class, + 'Html' => Collective\Html\HtmlFacade::class, + ], ]; diff --git a/resources/views/includes/sidebar.blade.php b/resources/views/includes/sidebar.blade.php index f4e3f793..1eb03aeb 100644 --- a/resources/views/includes/sidebar.blade.php +++ b/resources/views/includes/sidebar.blade.php @@ -254,6 +254,13 @@ {{-- end laporan --}} + + {{-- Kemaskini Notis --}} +
{{ $message }}
+