You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for Laravel (First step: Try it out as PHP) #898
Is your feature request related to a problem? Please describe.
Laravel doesn't have explicit support in ddev. We should consider adding it.
Describe the solution you'd like
We can template out the config/database.php file with the appropriate credentials added, but this would be a fairly undesirable solution in the laravel community. If you look at that file, it's reading credentials from the environment variables DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, and DB_DATABASE. If we set those environment variables, Laravel should "just work".
We could also write out a .env file (example) with our creds prepopulated.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
I'd had a look at adding this a year or so ago but ultimately became bearish because we didn't have contacts in the laravel community and homestead exists and looks to be officially supported.
Homestead is a gigantic Vagrant box. Personally, I'm pretty happy with the idea of never installing Virtualbox again :) There's also Laravel Valet, which is another officially supported solution for macos, but I had lots of problems with it.
Need @alkymst time on this, but I know he's tied up at the moment. Same is true for GravCMS, which we've had at least 3 or 4 requests or inquiries about.
"Official" support just means customizing settings files and sometimes nginx/apache config. So the reality is it's mighty easy to work with any PHP framework just using the 'php' project type. A few people have done that, but we haven't had a lot of activity here as you can see, so it hasn't made the priority list.
@unherz PRs are always welcome, but you might want to start by just documenting how to run it, and what's required. A great place to incubate that kind of thing is on Stack Overflow (tagged "ddev" of course). You can make a question and answer it yourself.
BTW, the best path forward for Laravel at this point is just to do a PR explaining how to use it with project type 'php' in github.com/drud/ddev-contrib. Super easy to put that into a PR there, and it will be a great start. If ddev gets any traction in the Laravel community it can be added as a top-level supported framework.
Activity
dapseen commentedon Jun 1, 2018
+1
beeradb commentedon Jun 27, 2018
Any thoughts about what would make this more attractive than https://laravel.com/docs/5.6/homestead ?
I'd had a look at adding this a year or so ago but ultimately became bearish because we didn't have contacts in the laravel community and homestead exists and looks to be officially supported.
cweagans commentedon Jun 27, 2018
Homestead is a gigantic Vagrant box. Personally, I'm pretty happy with the idea of never installing Virtualbox again :) There's also Laravel Valet, which is another officially supported solution for macos, but I had lots of problems with it.
alkymst commentedon Jun 27, 2018
I think the argument is that agencies will do some WP, some Drupal, and a few Laravel sites. So one platform to manage it all.
alkymst commentedon Jun 27, 2018
I'm first just going to take it for a test ride and document getting it spun up with generic PHP.
5 remaining items
rickmanelius commentedon Jul 30, 2018
Need @alkymst time on this, but I know he's tied up at the moment. Same is true for GravCMS, which we've had at least 3 or 4 requests or inquiries about.
bessone commentedon Jan 10, 2019
Some updates on "official" Laravel support or is the idea dead?
rfay commentedon Jan 10, 2019
"Official" support just means customizing settings files and sometimes nginx/apache config. So the reality is it's mighty easy to work with any PHP framework just using the 'php' project type. A few people have done that, but we haven't had a lot of activity here as you can see, so it hasn't made the priority list.
unherz commentedon Feb 13, 2019
@rfay Can we start to work on it and open a PR or is this task already assigned and planned for a future release?
rfay commentedon Feb 13, 2019
@unherz PRs are always welcome, but you might want to start by just documenting how to run it, and what's required. A great place to incubate that kind of thing is on Stack Overflow (tagged "ddev" of course). You can make a question and answer it yourself.
tommym9 commentedon Apr 28, 2019
Hi all,
Just having a play with this today and Laravel runs just fine under the php option.
Agree it would be nice if ddev could do the scaffolding (setup env file, run key:generate, etc) but its pretty straightforward to do.
Cheers
Tom
rfay commentedon Apr 29, 2019
Thanks so much for the report @tommym9
rfay commentedon Sep 18, 2019
BTW, the best path forward for Laravel at this point is just to do a PR explaining how to use it with project type 'php' in github.com/drud/ddev-contrib. Super easy to put that into a PR there, and it will be a great start. If ddev gets any traction in the Laravel community it can be added as a top-level supported framework.
marcmcd commentedon Sep 18, 2019
As suggester by rfay, see the answer to "How can I create a laravel 5 dev site with DDEV? here: https://stackoverflow.com/q/57983809/12082358
tomasnorre commentedon Sep 25, 2019
I started a new Laravel Project todo..
I just did
And then I was good to go..
https://twitter.com/randyfay/status/1176907118051385349
tommym9 commentedon Oct 2, 2019
As a +1 to the last comment. The step after is copying the
.env.examplefile to be.envand setting the database credentials. By default they areThese would change if you set the db credentials to something else in
.ddev/docker-compose.yaml@rfay happy to do a PR for https://github.com/drud/ddev-contrib. Should this be added as a new recipe? Or somewhere else in that repo?
Cheers
Tom
rfay commentedon Oct 2, 2019
@tommym9 yeah, new recipe would be great over there, like the REDAXO one.
tommym9 commentedon Oct 3, 2019
PR created here: ddev/ddev-contrib#18