Kode dari ftuntan_main dengan dependensi diperbarui untuk PHP 8.3 (perbaikan insiden 27 Okt 2026). Dump database di database/sql/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\AplikasiIntegrasi;
|
|
use App\Models\Kontak;
|
|
use App\Models\InformasiTerbaru;
|
|
use App\Models\UcapanSelamatDatang;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class UcapanSelamatDatangController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
*
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function index()
|
|
{
|
|
$session_user = Auth::user();
|
|
$ucapanSelamatDatang = UcapanSelamatDatang::all()->first();
|
|
return view('admin.ucapan_selamat_datang.index', compact('ucapanSelamatDatang', 'session_user'));
|
|
}
|
|
|
|
/**
|
|
* Update the specified resource in storage.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @param \App\Models\UcapanSelamatDatang $ucapanSelamatDatang
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function update(Request $request, UcapanSelamatDatang $ucapanSelamatDatang)
|
|
{
|
|
$this->validate($request, [
|
|
'teks' => 'required'
|
|
]);
|
|
|
|
UcapanSelamatDatang::where('id', $ucapanSelamatDatang->id)
|
|
->update([
|
|
'teks' => $request->teks
|
|
]);
|
|
|
|
return redirect('admin/ucapan_selamat_datang')->with('status', 'Ucapan Selamat Datang Berhasil Diubah!');
|
|
}
|
|
}
|