Skip to content

Commit

Permalink
Fir updates (#78)
Browse files Browse the repository at this point in the history
* README

* Update nav

* Update view

* Fix link
  • Loading branch information
schneems authored Dec 10, 2024
1 parent 0416ad2 commit 35953fe
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 40 deletions.
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
# php-getting-started
# PHP Getting Started

A barebones PHP app that makes use of the [Slim](https://www.slimframework.com/) web framework, which can easily be deployed to Heroku.

This application supports the [Getting Started with PHP on Heroku](https://devcenter.heroku.com/articles/getting-started-with-php) article - check it out.
This application supports the tutorials for both the [Cedar and Fir generations](https://devcenter.heroku.com/articles/generations) of the Heroku platform. You can check them out here:

## Deploying
- [Getting Started on Heroku with PHP](https://devcenter.heroku.com/articles/getting-started-with-php)
- [Getting Started on Heroku Fir with PHP](https://devcenter.heroku.com/articles/getting-started-with-php-fir)

## Deploying to Heroku

Using resources for this example app counts towards your usage. [Delete your app](https://devcenter.heroku.com/articles/heroku-cli-commands#heroku-apps-destroy) and [database](https://devcenter.heroku.com/articles/heroku-postgresql#removing-the-add-on) as soon as you are done experimenting to control costs.

### Deploy on Heroku [Cedar](https://devcenter.heroku.com/articles/generations#cedar)

By default, apps use Eco dynos if you are subscribed to Eco. Otherwise, it defaults to Basic dynos. The Eco dynos plan is shared across all Eco dynos in your account and is recommended if you plan on deploying many small apps to Heroku. Learn more about our low-cost plans [here](https://blog.heroku.com/new-low-cost-plans).

Eligible students can apply for platform credits through our new [Heroku for GitHub Students program](https://blog.heroku.com/github-student-developer-program).

Install the [Heroku Toolbelt](https://toolbelt.heroku.com/).

```sh
$ git clone [email protected]:heroku/php-getting-started.git # or clone your own fork
```text
$ git clone https://github.com/heroku/php-getting-started
$ cd php-getting-started
$ heroku create
$ git push heroku main
$ heroku open
```

or
### Deploy on Heroku [Fir](https://devcenter.heroku.com/articles/generations#fir)

[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
By default, apps on [Fir](https://devcenter.heroku.com/articles/generations#fir) use 1X-Classic dynos. To create an app on [Fir](https://devcenter.heroku.com/articles/generations#fir) you'll need to
[create a private space](https://devcenter.heroku.com/articles/working-with-private-spaces#create-a-private-space)
first.

```text
$ git clone https://github.com/heroku/php-getting-started
$ cd php-getting-started
$ heroku create --space <space-name>
$ git push heroku main
$ heroku ps:wait
$ heroku open
```
## Documentation

For more information about using PHP on Heroku, see these Dev Center articles:
Expand Down
44 changes: 23 additions & 21 deletions views/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,51 @@
</a>
<h1>Getting Started with PHP on Heroku</h1>
<p>This is a sample PHP application deployed to Heroku. It's a reasonably simple app - but a good foundation for understanding how to get the most out of the Heroku platform.</p>
<a type="button" class="btn btn-lg btn-default" href="https://devcenter.heroku.com/articles/getting-started-with-php"><span class="glyphicon glyphicon-flash"></span> Getting Started with PHP</a>
<a type="button" class="btn btn-lg btn-default" href="https://devcenter.heroku.com/articles/getting-started-with-php"><span class="glyphicon glyphicon-flash"></span> Getting Started on Heroku with PHP</a>
<a type="button" class="btn btn-lg btn-default" href="https://devcenter.heroku.com/articles/getting-started-with-php-fir"><span class="glyphicon glyphicon-flash"></span> Getting Started on Heroku Fir with PHP</a>
<a type="button" class="btn btn-lg btn-primary" href="https://github.com/heroku/php-getting-started"><span class="glyphicon glyphicon-download"></span> Source on GitHub</a>
</div>
</div>
<div class="container">
<div class="alert alert-info text-center" role="alert">
To deploy your own copy, and learn the fundamentals of the Heroku platform, head over to the <a href="https://devcenter.heroku.com/articles/getting-started-with-php" class="alert-link">Getting Started with PHP on Heroku</a> tutorial.
<div class="lead">
To deploy your own copy, and learn the fundamentals of the Heroku platform, head over to either of the following tutorials:
<ul>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php" class="alert-link">Getting Started on Heroku with PHP</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php-fir" class="alert-link">Getting Started on Heroku Fir with PHP</a></li>
</ul>
</div>
<hr>
<hr />
<div class="row">
<div class="col-md-6">
<h3><span class="glyphicon glyphicon-info-sign"></span> How this sample app works</h3>
<ul>
<li>This app was deployed to Heroku, either using Git or by using <a href="https://github.com/heroku/php-getting-started">Heroku Button</a> on the repository.</li>

<li>When Heroku received the source code, it fetched all the dependencies in the <a href="https://github.com/heroku/php-getting-started/blob/main/composer.json">composer.json</a>, creating a deployable slug.</li>
<li>The platform then spins up a dyno, a lightweight container that provides an isolated environment in which the slug can be mounted and executed.</li>
<li>This app was deployed to Heroku using Git.</li>
<li>When Heroku received the source code, it fetched all the dependencies in the <a href="https://github.com/heroku/php-getting-started/blob/main/composer.json">composer.json</a>, creating a deployable build artifact.</li>
<li>The platform then spins up a dyno, a lightweight container that provides an isolated environment in which the build artifact can be mounted and executed.</li>
<li>You can scale your app, manage it, and deploy over <a href="https://addons.heroku.com/">150 add-on services</a>, from the Dashboard or CLI.</li>
</ul>
</div>
<div class="col-md-6">
<h3><span class="glyphicon glyphicon-link"></span> Next Steps</h3>
<ul>
<li>If you are following the <a href="https://devcenter.heroku.com/articles/getting-started-with-php">Getting Started</a> guide, then please head back to the tutorial and follow the next steps!</li>
<li>If you deployed this app by deploying the Heroku Button, then in a command line shell, run:</li>
<ul>
<li><code>git clone https://github.com/heroku/php-getting-started.git</code> - this will create a local copy of the source code for the app</li>
<li><code>cd php-getting-started</code> - change directory into the local source code repository</li>
<li><code>heroku git:remote -a &lt;your-app-name></code> - associate the Heroku app with the repository</li>
<li>You'll now be set up to run the app locally, or <a href="https://devcenter.heroku.com/articles/getting-started-with-php#push-local-changes">deploy changes</a> to Heroku</li>
</ul>
<li>If you are following the <a href="https://devcenter.heroku.com/articles/getting-started-with-php">Getting Started on Heroku with PHP</a> or <a href="https://devcenter.heroku.com/articles/getting-started-with-php-fir">Getting Started on Heroku Fir with PHP</a> guide, then please head back to the tutorial and follow the next steps!</li>
</ul>
<h3><span class="glyphicon glyphicon-link"></span> Helpful Links</h3>
<ul>
<li><a href="https://www.heroku.com/home">Heroku</a></li>
<li><a href="https://devcenter.heroku.com/">Heroku Dev Center</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php">Getting Started with PHP on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/deploying-php">Deploying PHP Apps on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php">Getting Started on Heroku with PHP</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php-fir">Getting Started on Heroku Fir with PHP</a></li>
<li><a href="https://devcenter.heroku.com/categories/php">PHP articles on the Heroku Dev Center</a></li>
</ul>
</div>
</div> <!-- row -->
<div class="alert alert-info text-center" role="alert">
Please do work through the Getting Started guide, even if you do know how to build such an application. The guide covers the basics of working with Heroku, and will familiarize you with all the concepts you need in order to build and deploy your own apps.
</div>
<div class="row" style="margin-top:1em">
<div class="col-md-12">
<p class="alert alert-info" role="alert">
Please do work through the Getting Started guide, even if you do know how to build such an application. The guide covers the basics of working with Heroku, and will familiarize you with all the concepts you need in order to build and deploy your own apps.
</p>
</div>
</div>
</div>

Expand Down
37 changes: 27 additions & 10 deletions views/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,38 @@
<a href="https://devcenter.heroku.com/articles/how-heroku-works"><span class="glyphicon glyphicon-user"></span> How Heroku Works</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-info-sign"></span> Getting Started Guides <span class="caret"></span></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-info-sign"></span> Getting Started Guides (Cedar) <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-ruby">Getting Started with Ruby on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-nodejs">Getting Started with Node on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php">Getting Started with PHP on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-python">Getting Started with Python on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-java">Getting Started with Java on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-go">Getting Started with Go on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-clojure">Getting Started with Clojure on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-scala">Getting Started with Scala on Heroku</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-ruby">Getting Started on Heroku with Ruby</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-nodejs">Getting Started on Heroku with Node.js</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php">Getting Started on Heroku with PHP</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-python">Getting Started on Heroku with Python</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-java">Getting Started on Heroku with Java</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-clojure">Getting Started on Heroku with Clojure</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-scala">Getting Started on Heroku with Scala</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-go">Getting Started on Heroku with Go</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-dotnet">Getting Started on Heroku with .NET</a></li>
<li class="divider"></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-heroku-and-connect-without-local-dev">Getting Started on Heroku with Heroku Connect</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-jruby">Getting Started with Ruby on Heroku (Microsoft Windows)</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-info-sign"></span> Getting Started Guides (Fir) <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-ruby-fir">Getting Started on Heroku Fir with Ruby</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-nodejs-fir">Getting Started on Heroku Fir with Node.js</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-php-fir">Getting Started on Heroku Fir with PHP</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-python-fir">Getting Started on Heroku Fir with Python</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-java-maven-fir">Getting Started on Heroku Fir with Java (Maven)</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-java-gradle-fir">Getting Started on Heroku Fir with Java (Gradle)</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-clojure-fir">Getting Started on Heroku Fir with Clojure</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-scala-fir">Getting Started on Heroku Fir with Scala</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-go-fir">Getting Started on Heroku Fir with Go</a></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-dotnet-fir">Getting Started on Heroku Fir with .NET</a></li>
<li class="divider"></li>
<li><a href="https://devcenter.heroku.com/articles/getting-started-with-heroku-and-connect-without-local-dev">Getting Started on Heroku with Heroku Connect</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="navbar-right">
Expand Down

0 comments on commit 35953fe

Please sign in to comment.