Minggu, 18 Januari 2026

Aplikasi Peminjaman Alat

APLIKASI PEMINJAMAN ALAT UKK 2026

 1. Jalankan Database Server Mysql


2. Persiapan Dowmload Composer, Nodejs, Git dan veris php pastikan versi 8.2 keatas


3. Buat New Folder di C/Xampp/Htdoct diterminal atau cmd

4. Buat Project laravel baru

Laravel New ukk_peminjamanalat_rae
atau
composer create-project laravel/laravel ukk_peminjamanalat_rae

5. Lanjutannya jika ada pilihan pilihlah
> None
> (0) Pest
> Mysql
> Yes
NPM Install & NPM run build
cd ukk_peminjamanalat_rae
code .

masuk Terminal ketikkan: php artisan serve
jika output seperti ini, segera perbaiki


cari folder .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=nama_database
DB_USERNAME=root
DB_PASSWORD=

✅ Clear Laravel config cache

Laravel may still be using old cached config.

php artisan config:clear php artisan cache:clear

If you’re in production:

php artisan config:cache

✅ Run migrations

Since the error references the sessions table:

php artisan migrate
yes
tampilan sementara harus seperti ini




6. Install Filament
composer require filament/filament:"^5.0"
PS C:\xampp\htdocs\ukk_peminjamanalat_rae> php artisan filament:install --panels

  What is the panel's ID? [admin]
❯ admin
7. Buat Laman Login dengan Build Filament
Jika eror ketikan di terminal php artisan tinker


membuat username dan password:
php artisan make:filament-User

8. CRUD User
php artisan make:filament-resuorce User --generate --view 
> id
Tombol Delete User: Filament>Resource>User>Tables>usersTable.php
->recordActions([
                ViewAction::make(),
                EditAction::make(),
            #deleteuser
                DeleteAction::make(),
            ])

Opsi Jika Eror Tambahkan : use Filament\Actions\DeleteAction;




9. CRUD Siswa : 
php artisan make:model major -m
php artisan make: model classroom -m
php artisan make: model student -m

buka laman database>migration>major
  public function up(): void
    {
        Schema::create('majors', function (Blueprint $table) {
            $table->id();
            $table->String('name');
            $table->String('code');
            $table->boolean('is_active')->default(true);
            $table->timestamps();
        });
    }
buka laman database>migration>classroom
public function up(): void
    {
        Schema::create('classrooms', function (Blueprint $table) {
            $table->id();
            $table->foreignId('major_id')->constrained()->cascadeOnDelete();
            $table->String('name');
            $table->integer('level');
            $table->boolean('is_active')->default(true);
            $table->timestamps();
        });
    }
buka laman database>migration>student
public function up(): void
    {
        Schema::create('students', function (Blueprint $table) {
            $table->id();
            $table->ForeignId('user_id')->constrained()->cascadeOnDelete();
            $table->ForeignId('classroom_id')->constrained()->cascadeOnDelete();
            $table->string('nisn')->unique();
            $table->string('phone_number');
            $table->enum('gende',['male','female']);
            $table->text('address')->nullable();
            $table->string('profile_picture')->nullable();
            $table->timestamps();
        });
    }

PS C:\xampp\htdocs\ukk_peminjamanalat_rae> php artisan migrate

   INFO  Running migrations.  

  2026_01_18_135846_create_majors_table ................................................ 34.07ms DONE

  2026_01_18_201608_create_classrooms_table ........................................... 183.85ms DONE

  2026_01_18_201623_create_students_table ............................................. 242.96ms DONE

PS C:\xampp\htdocs\ukk_peminjamanalat_rae> php artisan make:filament-resource Major --generate --view

 The "title attribute" is used to label each record in the UI.

 You can leave this blank if records do not have a title.

  What is the title attribute for this model?
id

   INFO  Filament resource [App\Filament\Resources\Majors\MajorResource] created successfully.  

PS C:\xampp\htdocs\ukk_peminjamanalat_rae> php artisan make:filament-resource Classroom --generate --view

 The "title attribute" is used to label each record in the UI.

 You can leave this blank if records do not have a title.

  What is the title attribute for this model?
id

   INFO  Filament resource [App\Filament\Resources\Classrooms\ClassroomResource] created successfully. 


PS C:\xampp\htdocs\ukk_peminjamanalat_rae> php artisan make:filament-resource student --generate --view
  

 The "title attribute" is used to label each record in the UI.

 You can leave this blank if records do not have a title.

  What is the title attribute for this model?
id

   INFO  Filament resource [App\Filament\Resources\Students\StudentResource] created successfully. 






Tidak ada komentar:

Posting Komentar

Penjelasan Teori Pengambangan Aplikasi Peminjaman ALat

Belajar SQL Dasar #12: JOIN (INNER, LEFT, RIGHT, FULL) — SantriKoding.com — Website Belajar Coding Bahasa Indonesia Secara Terstruktur. Beri...