feature: form upload reklame

This commit is contained in:
2025-02-11 16:57:53 +07:00
parent 9c41fad232
commit ecf9096149
17 changed files with 1748 additions and 263 deletions

View File

@@ -17,6 +17,15 @@ class AdvertisementController extends Controller
return view('data.advertisements.index');
}
/**
* Show the form for uploading a file.
*/
public function bulkCreate()
{
// Mengembalikan view form-upload
return view('data.advertisements.form-upload');
}
/**
* Show the form for creating a new resource.
*/
@@ -38,7 +47,7 @@ class AdvertisementController extends Controller
// $route = 'advertisements.create';
// info("AdvertisementController@edit diakses dengan ID: $title");
return view('form-create-update.form', compact('title', 'subtitle', 'fields', 'fieldTypes', 'apiUrl', 'dropdownOptions'));
return view('data.advertisements.form', compact('title', 'subtitle', 'fields', 'fieldTypes', 'apiUrl', 'dropdownOptions'));
}
/**
@@ -77,7 +86,7 @@ class AdvertisementController extends Controller
// $route = 'advertisements.update'; // Menggunakan route update untuk form edit
// info("AdvertisementController@edit diakses dengan route: $route");
return view('form-create-update.form', compact('title', 'subtitle', 'modelInstance', 'fields', 'fieldTypes', 'apiUrl', 'dropdownOptions'));
return view('data.advertisements.form', compact('title', 'subtitle', 'modelInstance', 'fields', 'fieldTypes', 'apiUrl', 'dropdownOptions'));
}
private function getFields()
@@ -90,8 +99,8 @@ class AdvertisementController extends Controller
"advertisement_content" => "Isi Reklame",
"business_address" => "Alamat Wajib Pajak",
"advertisement_location" => "Lokasi Reklame",
"village_name" => "Desa",
"district_name" => "Kecamatan",
"village_name" => "Desa",
"length" => "Panjang",
"width" => "Lebar",
"viewing_angle" => "Sudut Pandang",