-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
461 additions
and
31 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
Modules/PPDB/Database/Migrations/2022_04_01_191038_create_berkas_murids_table.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,40 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateBerkasMuridsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('berkas_murids', function (Blueprint $table) { | ||
$table->id(); | ||
$table->bigInteger('user_id'); | ||
$table->string('kartu_keluarga')->nullable(); | ||
$table->string('akte_kelahiran')->nullable(); | ||
$table->string('surat_kelakuan_baik')->nullable(); | ||
$table->string('surat_sehat')->nullable(); | ||
$table->string('surat_tidak_buta_warna')->nullable(); | ||
$table->string('rapor')->nullable(); | ||
$table->string('foto')->nullable(); | ||
$table->string('ijazah')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('berkas_murids'); | ||
} | ||
} |
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,14 @@ | ||
<?php | ||
|
||
namespace Modules\PPDB\Entities; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
|
||
class BerkasMurid extends Model | ||
{ | ||
use HasFactory; | ||
|
||
protected $table = 'berkas_murids'; | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
namespace Modules\PPDB\Http\Requests; | ||
|
||
use Illuminate\Foundation\Http\FormRequest; | ||
|
||
class berkasMuridRequest extends FormRequest | ||
{ | ||
/** | ||
* Get the validation rules that apply to the request. | ||
* | ||
* @return array | ||
*/ | ||
public function rules() | ||
{ | ||
return [ | ||
'kartu_keluarga' => 'required|mimes:jpg,jpeg,png,pdf|max:2048', | ||
'akte_kelahiran' => 'required|mimes:jpg,jpeg,png,pdf|max:2048', | ||
'surat_kelakuan_baik' => 'required|mimes:jpg,jpeg,png,pdf|max:2048', | ||
'surat_sehat' => 'required|mimes:jpg,jpeg,png,pdf|max:2048', | ||
'surat_tidak_buta_warna' => 'required|mimes:jpg,jpeg,png,pdf|max:2048', | ||
'rapor' => 'required|mimes:jpg,jpeg,png,pdf|max:2048', | ||
'foto' => 'required|mimes:jpg,jpeg,png,pdf|max:2048', | ||
'ijazah' => 'mimes:jpg,jpeg,png,pdf|max:2048' | ||
]; | ||
} | ||
|
||
public function messages() | ||
{ | ||
return [ | ||
'kartu_keluarga.required' => 'File Kartu Keluarga tidak boleh kosong.', | ||
'kartu_keluarga.mimes' => 'Kartu Keluarga hanya mendukung .jpg .jpeg .png atau pdf.', | ||
'kartu_keluarga.max' => 'Ukuran file tidak boleh lebih dari 2MB.', | ||
'akte_kelahiran.required' => 'File Akte Kelahiran tidak boleh kosong.', | ||
'akte_kelahiran.mimes' => 'Akte Kelahiran hanya mendukung .jpg .jpeg .png atau pdf.', | ||
'akte_kelahiran.max' => 'Ukuran file tidak boleh lebih dari 2MB.', | ||
'surat_kelakuan_baik.required' => 'Surat Kelakuan Baik tidak boleh kosong.', | ||
'surat_kelakuan_baik.mimes' => 'Surat Kelakuan Baik hanya mendukung .jpg .jpeg .png atau pdf.', | ||
'surat_kelakuan_baik.max' => 'Ukuran file tidak boleh lebih dari 2MB.', | ||
'surat_sehat.required' => 'Surat Sehat tidak boleh kosong.', | ||
'surat_sehat.mimes' => 'Surat Sehat hanya mendukung .jpg .jpeg .png atau pdf.', | ||
'surat_sehat.max' => 'Ukuran file tidak boleh lebih dari 2MB.', | ||
'surat_tidak_buta_warna.required' => 'Surat Tidak Buta Warna tidak boleh kosong.', | ||
'surat_tidak_buta_warna.mimes' => 'Surat Tidak Buta Warna hanya mendukung .jpg .jpeg .png atau pdf.', | ||
'surat_tidak_buta_warna.max' => 'Ukuran file tidak boleh lebih dari 2MB.', | ||
'rapor.required' => 'Rapor tidak boleh kosong.', | ||
'rapor.mimes' => 'Rapor hanya mendukung .jpg .jpeg .png atau pdf.', | ||
'rapor.max' => 'Ukuran file tidak boleh lebih dari 2MB.', | ||
'foto.required' => 'Foto tidak boleh kosong.', | ||
'foto.mimes' => 'Foto hanya mendukung .jpg .jpeg .png atau pdf.', | ||
'foto.max' => 'Ukuran file tidak boleh lebih dari 2MB.', | ||
|
||
|
||
]; | ||
} | ||
|
||
/** | ||
* Determine if the user is authorized to make this request. | ||
* | ||
* @return bool | ||
*/ | ||
public function authorize() | ||
{ | ||
return true; | ||
} | ||
} |
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
Oops, something went wrong.