by Mahez Pradana
Installation Instructions(ID)
Installation Instructions(EN)
Kebutuhan Server:
- PHP >= 8.1
- Ctype PHP Extension
- cURL PHP Extension
- DOM PHP Extension
- Fileinfo PHP Extension
- Filter PHP Extension
- Hash PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PCRE PHP Extension
- PDO PHP Extension
- Session PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- PostgreSQL / SQL lainnya
Clone Repository
- Instal depedensi
composer install cp .env.example .env php artisan key:generate
- Isi .env sesuai .env.example disarankan APP_ENV=production dan APP_DEBUG=false
- Lakukan storage:link
Apabila gambar atau file tidak muncul/terdetek maka ada perbedaan pada cara melakukan link, seperti pada hosting cpanel.
php artisan storage:link
- Deploy database
dilakukan setelah mengisi .env bagian database dan command dibawah
php artisan migrate --seed
- Build Css
lakukan dengan nodejs
atau menggunakan compiled file dengan ekstrak dan memindahkan folder build ke dalam folder public atau public_html
npm run build
- Optimasi
php artisan config:cache php artisan route:cache php artisan view:cache php artisan event:cache php artisan filament:optimize
- Registrasi (app/Filament/User/Pages/Auth/Register.php)
- Search button akan melakukan fetch terhadap API
String $search
Http::get('https://api-frontend.kemdikbud.go.id/hit/' . $search)->json(); //function fetchDosenData#164 //Menghasilkan array:3 [▼ // app\Filament\User\Pages\Auth\Register.php:149 "dosen" => array:22 [▶] "prodi" => array:1 [▶] "pt" => array:1 [▶] ] //kemudian mapping array dosen array:2 [▼ // app\Filament\User\Pages\Auth\Register.php:134 "/data_dosen/xx" => "BUDI xx, NIDN : 0000000, PT : UNIVERSITAS, Prodi : AKUNTANSI" "/data_dosen/xx" => "BUDI xx, NIDN : 0000000, PT : UNIVERSITAS, Prodi : KEBIDANAN" ] //Simpan dan ekstrak data berdasarkan state/key dan jadikan NIDN dan NAMA sebagai hidden input
- Search button akan melakukan fetch terhadap API
String $search
- Sinkronasi Data profil (app/Filament/Pages/Auth/EditProfile.php)
private function hitDosenApiController(mixed $param) { try { //Dapatkan id berdasarkan pencarian dosen $getId = Http::get('https://pddikti.kemdikbud.go.id/api/pencarian/dosen/' . $param)->json(); //Dapatkan data profil berdasarkan id $response = Http::get('https://pddikti.kemdikbud.go.id/api/dosen/profile/' . $getId[0]['id'])->json(); return $response; } catch (Exception $e) { return $e->getMessage(); } } //Kemudian set setiap array key menjadi value hidden input
- Chatbot Train untuk memperbarui model chatbot dengan data terbaru
php artisan chatbot
- Menghapus file yang tidak digunakan
php artisan delete:unused-file
- Untuk unpublish semua pelatihan yang expired
php artisan unpublish:pelatihan
- Untuk menjalankan schedule
php artisan schedule:work untuk menjalankan $schedule->command('delete:unused-file')->daily()->timezone('Asia/Jakarta')->runInBackground(); $schedule->job(new TerjadwalJob())->everyMinute()->timezone('Asia/Jakarta'); $schedule->command('unpublish:pelatihan')->daily()->timezone('Asia/Jakarta'); $schedule->command('chatbot')->monthly()->timezone('Asia/Jakarta');
https://medium.com/@dimdev/9-php-runtimes-performance-benchmark-cbc0527b9df9 https://medium.com/beyn-technology/hola-frankenphp-laravel-octane-servers-comparison-pushing-the-boundaries-of-performance-d3e7ad8e652c
- PHP >= 8.1
- Ctype PHP Extension
- cURL PHP Extension
- DOM PHP Extension
- Fileinfo PHP Extension
- Filter PHP Extension
- Hash PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PCRE PHP Extension
- PDO PHP Extension
- Session PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- PostgreSQL / Other SQL databases
Clone Repository
- Install dependencies
composer install cp .env.example .env php artisan key:generate
- Fill in the .env file based on .env.example. It is recommended to set APP_ENV=production and APP_DEBUG=false.
- Create the storage link
If images or files don't appear or are not detected, there may be a difference in how the link is created, such as on cPanel hosting.
php artisan storage:link
- Deploy the database after configuring the database section in .env by running the following command:
php artisan migrate --seed
- Build CSS using Node.js
Alternatively, use the compiled file by extracting and moving the build folder into the public or public_html folder.
npm run build
- Optimize the application
php artisan config:cache php artisan route:cache php artisan view:cache php artisan event:cache php artisan filament:optimize
- Registration (app/Filament/User/Pages/Auth/Register.php)
- The Search button fetches data from the API with
String $search
Http::get('https://api-frontend.kemdikbud.go.id/hit/' . $search)->json(); // function fetchDosenData#164 // Returns array:3 [▼ // app\Filament\User\Pages\Auth\Register.php:149 "dosen" => array:22 [▶] "prodi" => array:1 [▶] "pt" => array:1 [▶] ] // Then map the dosen array array:2 [▼ // app\Filament\User\Pages\Auth\Register.php:134 "/data_dosen/xx" => "BUDI xx, NIDN: 0000000, PT: UNIVERSITAS, Prodi: AKUNTANSI" "/data_dosen/xx" => "BUDI xx, NIDN: 0000000, PT: UNIVERSITAS, Prodi: KEBIDANAN" ] // Save and extract data based on state/key, and set NIDN and NAME as hidden input
- The Search button fetches data from the API with
String $search
- Profile Data Synchronization (app/Filament/Pages/Auth/EditProfile.php)
private function hitDosenApiController(mixed $param) { try { // Retrieve ID based on dosen search $getId = Http::get('https://pddikti.kemdikbud.go.id/api/pencarian/dosen/' . $param)->json(); // Get profile data based on ID $response = Http::get('https://pddikti.kemdikbud.go.id/api/dosen/profile/' . $getId[0]['id'])->json(); return $response; } catch (Exception $e) { return $e->getMessage(); } } // Then set each array key as a hidden input value
- Chatbot Train to update the chatbot model with the latest data
php artisan chatbot
- Delete unused files
php artisan delete:unused-file
- Unpublish all expired training courses
php artisan unpublish:pelatihan
- Run the schedule
php artisan schedule:work To run the schedule: $schedule->command('delete:unused-file')->daily()->timezone('Asia/Jakarta')->runInBackground(); $schedule->job(new TerjadwalJob())->everyMinute()->timezone('Asia/Jakarta'); $schedule->command('unpublish:pelatihan')->daily()->timezone('Asia/Jakarta'); $schedule->command('chatbot')->monthly()->timezone('Asia/Jakarta');
https://medium.com/@dimdev/9-php-runtimes-performance-benchmark-cbc0527b9df9
https://medium.com/beyn-technology/hola-frankenphp-laravel-octane-servers-comparison-pushing-the-boundaries-of-performance-d3e7ad8e652c