Is Xampp required for laravel?

how to run laravel project on localhost xampp
laravel 6 xampp
how to run existing laravel project in xampp
laravel download
xampp laravel mac
laravel xampp public folder
download composer xampp
how to deploy laravel project on xampp

I am new to PHP and Laravel.

I installed Laravel and Composer , created new project and it is working fine.

Now when i tried to migrate a database using this command php artisan migrate i got errors, i wonder is it something related to not installing Xampp ? i am running Mac OS

The errors i got is

 1   PDOException::("SQLSTATE[HY000] [2002] Connection refused")
      /app/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68

  2   PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=app", "root", "", [])
    /app/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68

Xampp has nothing to do with Laravel itself. Xampp is a set of tools that is usually used together to deliver websites. Xampp just makes it easier (supposedly) to install those set for you. Rather than having to install and setup all yourself.

Today people tend to avoid such sets in favour for tools like Vagrant or Docker. Laravel even provides its own Vagrant setup called Homestead. See ie. in Laravel 5.5 docs: https://laravel.com/docs/5.5/homestead

If you don't want to use Homestead but build your own server environment there's also tools to make this easier for you. For example there is http://www.puphpet.com for PHP + Vagrant and https://phpdocker.io/ for PHP + Docker.

Laravel 4.1 installation with composer in xampp, (/ˈzæmp/ or /ˈɛks.æmp/) is a free and open-source cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages. Steps to Install Laravel 7 on Windows 10 1. Install XAMPP. XAMPP is the most popular PHP development environment. It is completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. MariaDB is a community-developed, commercially supported fork of MySQL.

Xampp is not required but a php server like apache or nginx is required also in order to use mysql you should have mysql installed you get this error

PDOException::("SQLSTATE[HY000] [2002] Connection refused") /app/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68

because the mysql service is turned off so I think you open Xampp control Panel and you start mysql in order for it to work and this is why you have asked if Xampp is required am I right !!!

Actually to prove that Xampp has nothing to do with Laravel you can start the mysql server from command line I will give you example in windows OS.

if you have xampp installed on C:/ Driver lets say then try cd(change directory) into this path in your command line

cd c:/xampp/mysql/bin
start mysqld.exe // this will start the mysql service for you

now you can navigate to your Laravel app and try to migrate this time you won't get connection refused error and that is because you have started the Mysql server from command line.

I think this proves that Xampp has nothing to do with Laravel.

Hope this was helpful, good luck.

XAMPP, After you've downloaded and installed Xampp, we need to install Composer. Composer is a PHP package manager that is integrated with  Once you have downloaded and installed XAMPP on Windows, then you need to do is Download Composer for Windows and Install it. For more details, see our step by step guide on How to Install Composer On Windows With XAMPP. Laravel utilizes Composer to manage its dependencies. It must installed before setting up Laravel.

Mac OS comes with PHP built into it. You should be able to use php -v to see what version. Use php -S localhost:xxxx to output the local directory to a local address.

For example, to run laravel locally, open the terminal cmd+spacebar, type terminal, open it, then use change to the path where your laravel project is.

Type php -S localhost:3000 and it should give you a confirmation in the terminal. Now open a browser and go to localhost:3000 and it should show your project.

How to install Laravel 5 with Xampp (Windows), To install different versions of Laravel, the PHP version of your XAMPP program is very important. To install Laravel, version 5.7 you need the  Go to XAMPP directory > phpMyAdmin and open the config.inc.php file. Add your new password in the configuration settings. Go to localhost/phpmyadmin in the browser or click Admin button of MySQL…

How to Install Laravel on Local host XAMPP, JSON PHP Extension. # Xampp for Windows. Download Xampp: As we saw in the basic requirements, we need PHP >= 7.1.3. All of these requirements are satisfied by the Laravel Homestead virtual machine, so it's highly recommended that you use Homestead as your local Laravel development environment. However, if you are not using Homestead, you will need to make sure your server meets the following requirements:

How to Install Laravel 5.6 with Xampp on Windows, Now the domain api.fakeTwitter.com will point to our localhost IP address. Next thing to do is to set up virtual host in XAMPP configuration, for that need we should  The field under validation will be excluded from the request data returned by the validate and validated methods if the anotherfield field is equal to value. exclude_unless:anotherfield,value. The field under validation will be excluded from the request data returned by the validate and validated methods unless anotherfield's field is equal to value.

Laravel practical guide for using XAMPP - Factory.hr, You need to run the following command only once. composer global require "​laravel/installer". After installing, you can create a fresh project using the following  Once you are done with XAMPP it’s now time to setup Composer. Composer is a dependency management or package management tool which is integrated with Laravel Framework. Check by running composer command in your terminal if your system has composer already installed in it.

Comments
  • No but you do need a MySQL database and a Web Server of some sort
  • Xampp specifically is not required, but some kind of web-server stack is. Laravel is a PHP web framework after all...
  • I didn't remember downloading anything related to SQl i only installed PHP, Composer and used composer to install laravel , so what should i do ?
  • Are you using linux or Windows?
  • @Dodz read the docs on laravel.com. It's pretty clear you didn't. They even have Valet for Mac.
  • For Laravel, it's better to use php artisan serve to run a local development server but that doesn't seem to be the issue here, the issue is missing mysql.
  • @Devon Good point, I forgot it has that feature. I use OSXs built in apache server.