Skip to content

Add support for Laravel (First step: Try it out as PHP) #898

Closed

Description

@cweagans

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.

Activity

  1. added this to the v1.5.0 milestone on May 31, 2018
  2. dapseen commented on Jun 1, 2018

    @dapseen

    +1

  3. modified the milestones: v1.5.0, v1.0.0 on Jun 27, 2018
  4. beeradb commented on Jun 27, 2018

    @beeradb
    Contributor

    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.

  5. cweagans commented on Jun 27, 2018

    @cweagans
    ContributorAuthor

    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.

  6. alkymst commented on Jun 27, 2018

    @alkymst
    Contributor

    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.

  7. alkymst commented on Jun 27, 2018

    @alkymst
    Contributor

    I'm first just going to take it for a test ride and document getting it spun up with generic PHP.

  8. removed this from the v1.0.0 milestone on Jul 9, 2018
  9. 5 remaining items

  10. rickmanelius commented on Jul 30, 2018

    @rickmanelius
    Contributor

    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.

  11. removed this from the v1.2.0 milestone on Sep 12, 2018
  12. bessone commented on Jan 10, 2019

    @bessone

    Some updates on "official" Laravel support or is the idea dead?

  13. rfay commented on Jan 10, 2019

    @rfay
    Member

    "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.

  14. unherz commented on Feb 13, 2019

    @unherz

    @rfay Can we start to work on it and open a PR or is this task already assigned and planned for a future release?

  15. rfay commented on Feb 13, 2019

    @rfay
    Member

    @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.

  16. tommym9 commented on Apr 28, 2019

    @tommym9

    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

  17. rfay commented on Apr 29, 2019

    @rfay
    Member

    Thanks so much for the report @tommym9

  18. rfay commented on Sep 18, 2019

    @rfay
    Member

    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.

  19. marcmcd commented on Sep 18, 2019

    @marcmcd

    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

  20. tomasnorre commented on Sep 25, 2019

    @tomasnorre
    Contributor

    I started a new Laravel Project todo..

    I just did

    $ composer create-project --prefer-dist laravel/laravel software-name "5.8.*"
    $ ddev config
    

    And then I was good to go..

    https://twitter.com/randyfay/status/1176907118051385349

  21. tommym9 commented on Oct 2, 2019

    @tommym9

    As a +1 to the last comment. The step after is copying the .env.example file to be .env and setting the database credentials. By default they are

    DB_CONNECTION=mysql
    DB_HOST=db
    DB_PORT=3306
    DB_DATABASE=db
    DB_USERNAME=db
    DB_PASSWORD=db
    

    These 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

  22. rfay commented on Oct 2, 2019

    @rfay
    Member

    @tommym9 yeah, new recipe would be great over there, like the REDAXO one.

  23. tommym9 commented on Oct 3, 2019

    @tommym9

    PR created here: ddev/ddev-contrib#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions