Cara Membuat Halaman Login Dan Register Pada Laravel 9 » Membuat halaman login dan register (pendaftaran) pada laravel 9. Show membuat halaman login maupun register di laravel terbilang cukup mudah karena framework laravel sendiri sudah menyediakannya. terutama table user jadi kalian tidak perlu repot membuatnya terlebih dahulu, cukup memigrasikan table yang ada di laravel ke database mysql dan pada tutorial pemrograman kali ini juga akan memakai npm yaitu sebuah package dari node js untuk membuat tampilan login di laravelnya. bagi kalian yang belum menginstall npm node js silahkan install terlebih dahulu, untuk tutorial install nya di sini dan juga di sini memakai laravel versi 9, untuk mengecek versi yang kalian gunakan bisa ketikan perintah pada terminal. php artisan --version Cara Membuat Login Dan Register Pada Laravel Versi 9source : pixabay.comjika sudah mengetahui versi laravel yang di pakai ,dan telah berhasil menginstall npm node js, langsung saja ke tutorialnya. Buat proyek laravel langkah awal kalian harus membuat terlebih dahulu proyek laravelnya jika belum punya, tetapi jika sudah mempunyai proyek laravel kamu bisa skip step ini. Koneksikan database mysql langkah kedua kalian harus koneksikan terlebih dahulu proyek laravel kalian ke database, kunjungi http://localhost/phpmyadmin, dan buat database mysql setelah itu koneksikan melalui file .env. Install laravel UI *pastikan kalian sudah mengakses proyek laravel kalian sebelum melakukan perintah install laravel UI, untuk mengakses proyek kalian bisa lakukan perintah cd C:/xampp/htdocs/mylaravel pada kata nama mylaravel masukan nama proyek kalian, untuk install UI laravel kalian bisa ketikan perintah composer require laravel/ui Generate scaffolding dasar, login dan registrasi untuk bootstrap php artisan ui bootstrap php artisan ui bootstrap --auth Generate scaffolding dasar, login dan registrasi untuk vue php artisan ui vue php artisan ui vue --auth * Jika ada perintah untuk replace ketik saja yes Membuat Generate scaffolding dasar, login dan registrasi untuk react php artisan ui react php artisan ui react --auth Generate scaffolding dasar php artisan ui bootstrap php artisan ui vue php artisan ui react Generate login / registration scaffolding php artisan ui bootstrap --auth php artisan ui vue --auth php artisan ui react --auth Migrasikan table user ke mysql selanjutnya migrasikan table user yang ada pada laravel ke database mysql dengan perintah cd C:/xampp/htdocs/mylaravel0 Install Npm dan jalankan setelah bethasil membuat ui dan migrasi user table, selanjutnya install dan jalankan npm dalam mode developer terlebih dahulu dengan perintah cd C:/xampp/htdocs/mylaravel1 Jalankan webserver untuk mengakses proyek selesai tutorialnya, sekarang kita akan akses proyek menggunakan webserver, buka new cmd lalu ketik perintah cd C:/xampp/htdocs/mylaravel kata nama mylaravel ganti dengan nama proyek kalian, setelah itu kita akan mengaktifkan webservernya agar proyek bisa di akses dengan perintah cd C:/xampp/htdocs/mylaravel3 Penutupsetelah berhasil membuat halaman login, register dan forgot password kalian juga bisa merubah tampilannya pada bagian resource > views > auth pada proyek laravel. demikian cara membuat login dan register pada laravel 9, semoga tutorial kali ini bisa bermanfaat dan menambah wawasan baru tentang pemrograman laravel. Tidak seperti pada Symfony, CakePHP, Phalcon, Yii atau Zend Framework, dll; pada Laravel dan Lumen tidak ada built-in fitur seperti ACL, MAC, DAC, RBAC atau apapun itu namanya. Beberapa package memang tersedia untuk menangani hal ini seperti Sentry, Entrust, dll. Pengalaman terakhir saya dengan beberapa packages tersebut lumayan jelek. Seperti misalnya setelah menggunakan Sentry ntah…Lainnya Horizon provides a beautiful dashboard and code-driven configuration for your Laravel powered Redis queues. Horizon allows you to easily monitor key metrics of your queue system such as job throughput, runtime, and job failures. All of your worker configuration is stored in a single, simple configuration file, allowing your configuration to stay in source control where your entire team can collaborate. Installation
You may use Composer to install Horizon into your Laravel project:
After installing Horizon, publish its assets using the 5 Artisan command:
ConfigurationAfter publishing Horizon's assets, its primary configuration file will be located at 6. This configuration file allows you to configure your worker options and each configuration option includes a description of its purpose, so be sure to thoroughly explore this file.
Balance OptionsHorizon allows you to choose from three balancing strategies: 9, 0, and 1. The 9 strategy, which is the configuration file's default, splits incoming jobs evenly between processes:The 0 strategy adjusts the number of worker processes per queue based on the current workload of the queue. For example, if your 4 queue has 1,000 waiting jobs while your 5 queue is empty, Horizon will allocate more workers to your 4 queue until it is empty. When the 7 option is set to 1, the default Laravel behavior will be used, which processes queues in the order they are listed in your configuration.When using the 0 strategy, you may define the 0 and 1 configuration options to control the minimum and maximum number of processes Horizon should scale up and down to. The 0 value specifies the minimum number of processes per queue, while the 1 value specifies the maximum number of processes across all queues:Job TrimmingThe 8 configuration file allows you to configure how long recent and failed jobs should be persisted (in minutes). By default, recent jobs are kept for one hour while failed jobs are kept for a week:Dashboard AuthorizationHorizon exposes a dashboard at 5. By default, you will only be able to access this dashboard in the 6 environment. Within your 7 file, there is a 8 method. This authorization gate controls access to Horizon in non-local environments. You are free to modify this gate as needed to restrict access to your Horizon installation:
Upgrading HorizonWhen upgrading to a new major version of Horizon, it's important that you carefully review the upgrade guide. In addition, you should re-publish Horizon's assets: Running HorizonOnce you have configured your workers in the 6 configuration file, you may start Horizon using the 8 Artisan command. This single command will start all of your configured workers:You may pause the Horizon process and instruct it to continue processing jobs using the 3 and 4 Artisan commands:
You may check the current status of the Horizon process using the 5 Artisan command:You may gracefully terminate the master Horizon process on your machine using the 6 Artisan command. Any jobs that Horizon is currently processing will be completed and then Horizon will exit:
Deploying HorizonIf you are deploying Horizon to a live server, you should configure a process monitor to monitor the 7 command and restart it if it quits unexpectedly. When deploying fresh code to your server, you will need to instruct the master Horizon process to terminate so it can be restarted by your process monitor and receive your code changes.Installing SupervisorSupervisor is a process monitor for the Linux operating system, and will automatically restart your 8 process if it fails. To install Supervisor on Ubuntu, you may use the following command:
Supervisor ConfigurationSupervisor configuration files are typically stored in the 9 directory. Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored. For example, let's create a 0 file that starts and monitors a 8 process:
Starting SupervisorOnce the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:
For more information on Supervisor, consult the Supervisor documentation. TagsHorizon allows you to assign “tags” to jobs, including mailables, event broadcasts, notifications, and queued event listeners. In fact, Horizon will intelligently and automatically tag most jobs depending on the Eloquent models that are attached to the job. For example, take a look at the following job:
If this job is queued with an 3 instance that has an 4 of 5, it will automatically receive the tag 6. This is because Horizon will examine the job's properties for any Eloquent models. If Eloquent models are found, Horizon will intelligently tag the job using the model's class name and primary key:
Manually TaggingIf you would like to manually define the tags for one of your queueable objects, you may define a 7 method on the class: 0Notifications
If you would like to be notified when one of your queues has a long wait time, you may use the 8, 9, and 0 methods. You may call these methods from your application's 1: 1Configuring Notification Wait Time ThresholdsYou may configure how many seconds are considered a "long wait" within your 6 configuration file. The 3 configuration option within this file allows you to control the long wait threshold for each connection / queue combination:MetricsHorizon includes a metrics dashboard which provides information on your job and queue wait times and throughput. In order to populate this dashboard, you should configure Horizon's 4 Artisan command to run every five minutes via your application's scheduler: |