Total Tayangan Halaman

Tampilkan postingan dengan label Laravel Akademik. Tampilkan semua postingan
Tampilkan postingan dengan label Laravel Akademik. Tampilkan semua postingan

Sabtu, 14 November 2026

Membuat aplikasi Akademik Framework Laravel Database Mysql

periapan install composer

Composer

cek 


kemudian buat file aplikasi 
pastikan xampp jangan dulu dijalankan
jika sudah selesai ctrl+C

 ^CTerminate batch job (Y/N)? ^C
Terminate batch job (Y/N)? Y
PS C:\xampp\htdocs> cd C:\xampp\htdocs\akademik
PS C:\xampp\htdocs\akademik> php artisan --version
Laravel Framework 12.72.0
PS C:\xampp\htdocs\akademik> netstat -ano | findstr :3306
PS C:\xampp\htdocs\akademik>



kemudian open vs code masuk ke folder 
.env 
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db_akademik
DB_USERNAME=root
DB_PASSWORD=




ketik diterminal:
composer require yajra/laravel-datatables-oracle:"^12.0"

membuat database:

php artisan make:model namadatabase -m
php artisan migrate
php artisan db:seed --class=userSeeder

 Schema::create('users', function (Blueprint $table) {
              $table->bigInteger('id')->autoincrement();
            $table->integer('nip')->nullable();
            $table->string('name')->nullable();
            $table->string('nohp', 15)->nullable();
            $table->enum('jenkel', ['Laki-Laki', 'Perempuan'])->nullable();
            $table->string('email')->unique();
            $table->string('password');
            $table->enum('level', ['admin','guru','walikelas','walimurid','siswa'])->nullable();
            $table->string('foto')->nullable();
            $table->timestamps();
        });

 Schema::create('siswa', function (Blueprint $table) {
            table->bigInteger('id')->autoincrement();
            $table->integer('nisn')->nullable();
            $table->string('nama_siswa')->nullable();
            $table->string('nohp_siswa', 15)->nullable();
            $table->enum('jenkel', ['Laki-Laki', 'Perempuan'])->nullable();
            $table->string('tmp_lahir')->nullable();
            $table->stringdate('tgl_lahir')->nullable();
            $table->string('password');
            $table->string('foto_siswa')->nullable();
            $table->text('alamat')->nullable();
            $table->timestamps();
        });

 Schema::create('kelas', function (Blueprint $table) {
            $table->bigInteger('id')->autoincrement();
             $table->bigInteger('id_tipekelas');
            $table->string('nama_kelas')->nullable();
           
            $table->timestamps();
                 });

        Schema::create('mapel', function (Blueprint $table) {
           $table->bigInteger('id')->autoincrement();
            $table->string('nama_mapel')->nullable();
            $table->timestamps();
        });

 Schema::create('guru_mapel', function (Blueprint $table) {
            $table->bigInteger('id')->autoincrement();
            $table->bigInteger('id_guru');
            $table->bigInteger('id_mapel');

            $table->timestamps();

        });

    Schema::create('siswa_kelas', function (Blueprint $table) {
           $table->bigInteger('id')->autoincrement();
            $table->bigInteger('id_siswa');
            $table->bigInteger('id_kelas');
            $table->timestamps();

           
        });
   

 Schema::create('tipe_kelas', function (Blueprint $table) {
            $table->bigInteger('id')->autoincrement();
            $table->bigInteger('id_tipekelas');
            $table->string('nama_tipekelas')->nullable();          
            $table->timestamps();
        });
    }

 Schema::create('orangtua', function (Blueprint $table) {
            $table->bigInteger('id')->autoincrement();
            $table->bigInteger('id_siswa');
            $table->string('nama_ayah')->nullable();        
            $table->string('nama_ibu')->nullable();
            $table->string('nohp_ortu', 15)->nullable();  
            $table->string('password');
            $table->timestamps();
               });



note perbaikan:
php artisan migrate:fresh  
php artisan migrate:fresh --seed
=========================================================================

PS C:\xampp\htdocs\akademik> php artisan make:controller AuthController

   INFO  Controller [C:\xampp\htdocs\akademik\app\Http\Controllers\AuthController.php] created successfully.  

PS C:\xampp\htdocs\akademik> php artisan make:controller HomeController

   INFO  Controller [C:\xampp\htdocs\akademik\app\Http\Controllers\HomeController.php] created successfully.  

php artisan make (untuk mengecek)

Http/AuthController
Http/Controller
class AuthController extends Controller
{
    public function index()
    {
        $data = array (
        'title' => 'Login Page'
        );
        return view('index');

    }
}

public function index()
    {
        $data = array (
        'title' => 'Home Page'
        );
        return view('home');

    }

upload hosting free

  Sign up for Free Hosting · Byet Host 1. Registrasi 2. Dapat notifikasi email