I simply need to share how I join my laravel undertaking with sqlserver.
I assume that you have already got Laragon and SQL Server in your native system.
Step 1. Obtain the PHP driver here
- Go to the underside of the web page then obtain windows-8.1.zip (since I am utilizing PHP 8.1
- Extract the zip file to a folder, then go to folder named x64, you will notice the next dll
- Then copy these dll to your php folder contained in the laragon folder, mine is C:laragonbinphpphp-8.1.5-nts-Win32-vs16-x64ext
- Then Edit your php.ini, add the extension
- Then restart your laragon server
Step 2. Make a brand new laravel app utilizing laragon fast app menu
- Then we have to replace the .env file
DB_CONNECTION=sqlsrv
DB_HOST=127.0.0.1
DB_PORT=1433
DB_DATABASE=lara-sqlserver
DB_USERNAME= sa
DB_PASSWORD= 12345678
- Subsequent, create the database in sql administration studio, mine is lara-sqlserver
-
Earlier than working the migration, make sure that to allow tcp-ip in sql configuration supervisor
-
then run the migration
php artisan migrate
- if every little thing works wonderful it is best to see this in your terminal
Thanks guys!