penambahan slug pada status permohonan
This commit is contained in:
parent
fec80bfa1c
commit
3c59943a08
@ -22,6 +22,7 @@
|
||||
return [
|
||||
$row->id,
|
||||
$row->name,
|
||||
$row->slug,
|
||||
$row->description,
|
||||
$row->status,
|
||||
$row->created_at
|
||||
@ -34,6 +35,7 @@
|
||||
return [
|
||||
'ID',
|
||||
'Name',
|
||||
'Slug',
|
||||
'Description',
|
||||
'Status',
|
||||
'Created At'
|
||||
@ -45,7 +47,7 @@
|
||||
{
|
||||
return [
|
||||
'A' => NumberFormat::FORMAT_NUMBER,
|
||||
'E' => NumberFormat::FORMAT_DATE_DATETIME
|
||||
'F' => NumberFormat::FORMAT_DATE_DATETIME
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace Modules\Lpj\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class StatusPermohonanRequest extends FormRequest
|
||||
{
|
||||
@ -38,6 +39,7 @@
|
||||
{
|
||||
$this->merge([
|
||||
'status' => isset($this->status) ? 1 : 0,
|
||||
'slug'=> Str::slug($this->name)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -5,5 +5,5 @@
|
||||
class StatusPermohonan extends Base
|
||||
{
|
||||
protected $table = 'status_permohonan';
|
||||
protected $fillable = ['name', 'description','status'];
|
||||
protected $fillable = ['name', 'description','status','slug'];
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ return new class extends Migration
|
||||
Schema::create('status_permohonan', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->unique();
|
||||
$table->string('slug')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->boolean('status')->default(true)->nullable();
|
||||
$table->timestamps();
|
||||
|
Loading…
Reference in New Issue
Block a user