-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perbaiki lihat daftar prosedur pada web di menu unduhan - error 500 (#…
…442) * perbaikan slug untuk prosedur * Fix styling * [ci skip] Mutakhirkan catatan rilis Co-authored-by: apidong <[email protected]> Co-authored-by: Agung Sugiarto <[email protected]>
- Loading branch information
1 parent
8266154
commit b79d881
Showing
5 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,5 +41,6 @@ class Prosedur extends Model | |
'judul_prosedur', | ||
'file_prosedur', | ||
'mime_type', | ||
'slug' | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
database/migrations/2022_06_22_205014_add_slug_prosedur.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
/* | ||
* File ini bagian dari: | ||
* | ||
* OpenDK | ||
* | ||
* Aplikasi dan source code ini dirilis berdasarkan lisensi GPL V3 | ||
* | ||
* Hak Cipta 2017 - 2022 Perkumpulan Desa Digital Terbuka (https://opendesa.id) | ||
* | ||
* Dengan ini diberikan izin, secara gratis, kepada siapa pun yang mendapatkan salinan | ||
* dari perangkat lunak ini dan file dokumentasi terkait ("Aplikasi Ini"), untuk diperlakukan | ||
* tanpa batasan, termasuk hak untuk menggunakan, menyalin, mengubah dan/atau mendistribusikan, | ||
* asal tunduk pada syarat berikut: | ||
* | ||
* Pemberitahuan hak cipta di atas dan pemberitahuan izin ini harus disertakan dalam | ||
* setiap salinan atau bagian penting Aplikasi Ini. Barang siapa yang menghapus atau menghilangkan | ||
* pemberitahuan ini melanggar ketentuan lisensi Aplikasi Ini. | ||
* | ||
* PERANGKAT LUNAK INI DISEDIAKAN "SEBAGAIMANA ADANYA", TANPA JAMINAN APA PUN, BAIK TERSURAT MAUPUN | ||
* TERSIRAT. PENULIS ATAU PEMEGANG HAK CIPTA SAMA SEKALI TIDAK BERTANGGUNG JAWAB ATAS KLAIM, KERUSAKAN ATAU | ||
* KEWAJIBAN APAPUN ATAS PENGGUNAAN ATAU LAINNYA TERKAIT APLIKASI INI. | ||
* | ||
* @package OpenDK | ||
* @author Tim Pengembang OpenDesa | ||
* @copyright Hak Cipta 2017 - 2022 Perkumpulan Desa Digital Terbuka (https://opendesa.id) | ||
* @license http://www.gnu.org/licenses/gpl.html GPL V3 | ||
* @link https://github.com/OpenSID/opendk | ||
*/ | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\DB; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddSlugProsedur extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('das_prosedur', function (Blueprint $table) { | ||
$table->char('slug', 50)->after('judul_prosedur')->nullable(false); | ||
}); | ||
|
||
// update data slug pada das prosedur | ||
DB::table('das_prosedur')->update(['slug' => DB::raw("lower(replace(judul_prosedur, ' ' , '-'))")]); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('das_prosedur', function (Blueprint $table) { | ||
$table->dropColumn('slug'); | ||
}); | ||
} | ||
} |