Translate

Monday, October 14, 2024

Laravel : Creating databases and tables

In Laravel, in creating database and table names, we use plural names for MySQL. While for the source code, we use singular names. For the form, don't forget to add the @csrf tag. Don't forget that after clicking the save button, return to the data input form.

Commands to create a Laravel 10 project:

composer create-project laravel/laravel:^10.0 form-input-app

The easiest way to install php, laravel, composer on Linux :

https://laravel-news.com/php-new

the command to install it on linux is like this :

/bin/bash -c "$(curl -fsSL https://php.new/install/linux)"

It is worth noting how to create a controller that functions to take data from the MariaDB database and display it in a table.

I want to install Arch Linux using the command: archinstall.


This is the initial design for the data input form proposed by chatGPT, later it still needs to be changed to be adjusted to be in line with the design before the Offcanvas menu is installed. made using Laravel and Bootstrap 5 assisted by Vite.


This is the form that will actually be applied to the ink data input form. The design has been modified from the chatGPT proposal. The form theme will follow the initial lines and there will also be a few improvements to the appearance of the menu items and the border color on the offcanvas. The offcanvas border color will likely be red and the offcanvas menu item color will have a white color and a red background when the mouse is over it.
This is the source code of design1.blade.php which has been combined with design2.blade.php and combined with the source code of the project that can save and edit data, the appearance still needs to be improved, so that later there will be design4.


This is the latest data deletion form design. This design has successfully combined the data deletion form with its offcanvas menu. Just add a warning sign if the user enters unexpected input. and add SQL code to connect to the database.


This morning we created a source code to display an error message if the data input box is not filled or the number of characters entered exceeds the allowed limit. Click this link if you want to see the source code.


now we are working on the contents of the table. so when connected to the database, the data will appear on the table page. in the end someone buys our affiliate product on tiktok .

We have successfully utilized the screen shoot feature in the Firefox browser to get photos of the products to be promoted along with product sales links obtained from TikTok and Tokopedia.


My Video on Tiktok

This tiktok video is about drinking coffee in the morning, the coffee is ground by hand using a manual coffee grinder. The coffee comes from Indonesia


Use this teapot to boil water and make coffee. It is small and easy to store in the cupboard. It is perfect for making coffee in the office.


If you want to watch a video about the electric kettle above on the YouTube site, then you can click this link to watch the video on YouTube.


This is a video about stir-fried vegetables, grilled chicken, fried eggplant, bread with peanut butter, and the last one is brewed coffee.


This is a chili sauce produced by a company called Indofood. This chili sauce is very suitable to be eaten with fried tofu, fried chicken, fried noodles.


This is a video that I made and uploaded to Youtube. This video is about a cream that can protect the face from sunlight and about a fast charger for smartphones.


If you feel that you have been charging your smartphone battery for a long time but the capacity of your smartphone battery is not able to be fully charged, then perhaps you need this tool.


In a relaxed atmosphere, we continue to work on promoting products via the internet.

Wednesday, October 9, 2024

Laravel : Change Table Name

Here's a guide on how to rename a table using the migration feature in Laravel version 10


The following is an example of a command-line interface (CLI) command to rename a column within a table :


php artisan make:migration rename_column_in_users_table --table=users


The command above will generate a file containing source code that will rename a column in a table.

Once we have successfully created a file named "2024_10_09_001126_rename_column_in_products_table.php", we will then edit the source code within this PHP file. This will allow us to execute the command to rename the desired column.

To perform table renames, you'll need to add the doctrine/dbal dependency. Copy the composer.phar file into your project directory. From your command line interface (CLI), navigate to your project directory and execute the following command:

composer require doctrine/dbal


After installing the dependency above, the PHP script for renaming the column will work properly.

Thursday, September 5, 2024

Wednesday, June 5, 2024

Python 3 : Source Code untuk Membuat Database SQLite3

Berikut ini adalah source code python untuk membuat database sqlite3. Source code ini bisa di terapkan tanpa perlu mengintsal SQLite3 di Linux. Jadi source code ini bisa diterapkan di VPS maupun di Project IDX. Sehingga sangat cocok di lingkungan cloud computing.


 import sqlite3  
 def membuatDatabase(namafile):  
   koneksi = None  
   try:  
     koneksi = sqlite3.connect(namafile)  
     print(sqlite3.sqlite_version)  
   except sqlite3.Error as e:  
     print(e)  
   finally:  
     if koneksi:  
       koneksi.close()  
 if __name__ == '__main__':  
   membuatDatabase("database1.db")  

Sehingga hanya dengan menggunakan python, maka kita sudah memiliki fungsi database. Kemampuan seperti ini yang akan terus kita kembangkan, karena akan menimbulkan efisiensi, tidak perlu menginstal paket SQLite3 secara terpisah


Berikut ini adalah source code untuk membuat tabel di dalam database yang sudah di buat di atas.


 import sqlite3  
 koneksi = sqlite3.connect("database1.db")  
 koneksimembuattabel = koneksi.cursor()  
 koneksimembuattabel.execute("""CREATE TABLE IF NOT EXISTS datapegawai([iddatapegawai] INTEGER, [namapegawai] TEXT)""")  
 koneksi.commit()  
 koneksi.close()  

Friday, May 24, 2024

Penggorengan

Penggorengan

Bahan-bahan Pembuat Wajan

Di bawah ini dijelaskan mengenai bahan-bahan pembuat wajan:

  1. Teflon
  2. Panci ini memiliki permukaan yang tidak lengket. Panci ini cocok untuk memasak masakan yang tidak membutuhkan banyak minyak. Wajan yang memiliki permukaan Teflon cocok untuk menggoreng telur, pancake, dan makanan lainnya yang mudah melengket ketika di masak.

Jenis-jenis Wajan

Ini beberapa jenis wajan:

  1. Wajan Marble
  2. Wajan marble adalah jenis wajan yang dilapisi dengan partikel marble halus, permukaannya kuat, tahan lama dan anti lengket. Berikut ini beberapa kelebihan dari wajan marble:

    1. Tahan Gores
    2. Jenis wajan ini lebih tahan terhadap goresan ketimbang wajan keramik

    3. Panas yang Lebih Merata
    4. Wajan jenis ini mampu menghasilkan masakan yang masak secara merata

    5. Membuat Tidak Khawatir Lengket
    6. Ketika memasak di atas wajan ini, masakan yang di masak tidak melengket di permukaan wajan.

    7. Mengesankan Citra Elegan
    8. Anda akan merasakan kemewahan yang berlebih ketika memasak menggunakan wajan marble

    9. Pilihan Desain Tidak Banyak
    10. Variasi desain dan warna yang tersedia tidak banyak

Tuesday, May 21, 2024

Cara Setting Mikrotik yang Mau Di Coba Di VPS

Cara settingnya di VPS yang mau dicobakan :


https://gist.github.com/amingholami/8c71bf2dbd95bd1ad187dd078635d7bf

Akhirnya mau coba yang di Digital Ocean, walau lebih mahal tapi semoga mikrotiknya bisa berjalan dengan baik


Mikrotik CHR试用在Digital Ocean已经成功。Mikrotik CHR运行成功。我们将持续学习和尝试管理云计算中的Mikrotik CHR。


使用Python语言进行Web编程也已成功地在Biznet Gio实施。我们将专注于云计算编程,因为我们无需物理管理服务器。


这是在Python虚拟环境中使用Python编程的结果。


 from flask import Flask  
 aplikasi = Flask(__name__)  
 @aplikasi.route('/')  
 def halaman1():  
   return 'Web dari Virtual Environment'  
 if __name__ == '__main__':  
   aplikasi.run(host='0.0.0.0',port=8547,debug=True)  

我们正在寻找适合与Python编程语言一起使用的IDE。

Refill Perfume Essence Purchase List

The following is a list of perfumes that are rarely used by the public along with a list of purchase links. 1. Mojave Ghost Purchase...