feat: Plan 2 — Form Edit Rumah Ibadah & Keluarga Miskin + Ownership
- Add user_id FK (nullable) to rumah_ibadah for ownership tracking - IbadahController: set user_id on store; enforce ownership on update/destroy - Add edit modals to map and data views (ibadah + miskin) - Popup and table row Edit buttons with per-record ownership check - 7 new tests covering ownership and full-field updates - Fix ExampleTest for auth-protected routes - Fix UserFactory missing email_verified_at column - Mark Plan 2 complete in missing_features.md; update README Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,5 +11,10 @@ class RumahIbadah extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'rumah_ibadah';
|
||||
protected $fillable = ['nama', 'alamat', 'latitude', 'longitude', 'radius'];
|
||||
protected $fillable = ['user_id', 'nama', 'jenis', 'alamat', 'latitude', 'longitude', 'radius', 'jumlah_jemaah', 'pengurus', 'telepon', 'keterangan'];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\User::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user