https://github.com/excessivecoding/laravel
https://github.com/excessivecoding/laravel
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/excessivecoding/laravel
- Owner: excessivecoding
- Created: 2023-12-11T14:47:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-11T14:47:55.000Z (over 1 year ago)
- Last Synced: 2025-03-01T00:39:42.446Z (about 2 months ago)
- Language: PHP
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
title: Laravel
description: A Laravel app that connects to a PostgreSQL database
tags:
- php
- laravel
- postgresql
---# Laravel Starter Example
This is a [Laravel](https://laravel.com/) starter app that connects to a Railway Postgres database.
[](https://railway.app/new/template/fWEWWf)
## ✨ Features
- PHP
- Laravel
- Postgres## 💁♀️ How to use
- [Create a Railway project with the Postgres plugin](https://railway.app/project?plugins=postgresql)
- Connect to your Railway project with `railway link`## 📝 Notes
- **Dockerfile**: The `Dockerfile` and associated files in `docker/` are based on [Laravel Sail PHP 8.0](https://github.com/laravel/sail/tree/1.x/runtimes/8.0)
- **Plugin Config**: To connect to a Railway Plugin, Postgres for example, you will need to utilize the environment variables listed for that plugin in the [Railway Docs](https://docs.railway.app/).
See the `.env.example` for an example of using these with Postgres.
- **Web server port**: Railway dynamically assigns a port for your webserver. We grab the `$PORT` environment variable in `docker/start-container` to set this on Artisan `serve`
- **Logging**: Because the disk on Railway containers is ephemeral, we pipe the logs normally output to `storage/logs/laravel.log` to `stdout` [as seen here](https://github.com/sorrell/railavel/commit/2802b8c5032a13a601a903276ee2181678009f67)
- **APP_KEY**: This starter will automatically generate the `APP_KEY` (`php artisan key:generate` in the `docker/start-container`)
- **Migrations**: This starter automatically runs migrations on deploy (in the `docker/start-container`)