Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cham11ng/multi-tenant-postgres
SAAS. Laravel Multi-tenant with Postgres. Reference: https://github.com/pacuna/Laravel-PGSchema
https://github.com/cham11ng/multi-tenant-postgres
axios laravel laravel-framework middleware multi-tenant postgres routing saas subdomain vue vue-components vuejs vuejs2
Last synced: 5 days ago
JSON representation
SAAS. Laravel Multi-tenant with Postgres. Reference: https://github.com/pacuna/Laravel-PGSchema
- Host: GitHub
- URL: https://github.com/cham11ng/multi-tenant-postgres
- Owner: cham11ng
- Created: 2017-06-09T09:50:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T00:53:09.000Z (over 2 years ago)
- Last Synced: 2024-04-13T23:55:26.676Z (7 months ago)
- Topics: axios, laravel, laravel-framework, middleware, multi-tenant, postgres, routing, saas, subdomain, vue, vue-components, vuejs, vuejs2
- Language: PHP
- Homepage:
- Size: 1.69 MB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multi-tenant Application (Software-as-a-Service)
Laravel Multi-tenant with Postgres.
### Installation:
`git clone` this repository and `cd` inside the project root, then enter the following commands
1. `composer install --prefer-dist -vvv` (might take a while to complete)
2. `cp .env.example .env`
3. `php artisan key:generate`
Now open `.env` file and make necessary changes to the **DB_** section.
**Yes, of course, you'll have to setup a database and it's user already before the next step!**
Otherwise, exactly what settings were you going to put in the _DB\__ section of the `.env` file?4. `php artisan migrate`
5. `php artisan db:seed`
6. `php artisan serve` ain't gonna work in this case. You need to _Virtual Host_ server name in term of _Apache_ or _Server Blocks_ in terms of _Nginx_
**Note:** `server name` should be same as `.env` file `APP_URL` section### Please Note
This software uses the [Laravel](https://laravel.com/ "Laravel") framework.
Currently, [Laravel 5.4](https://laravel.com/docs/5.4 "Laravel 5.4") is being used.
If you are getting any error, it is most probably due to
unfulfilled [requirements](https://laravel.com/docs/5.4#server-requirements "Server Requirements")
of the framework itself.Also, make sure that you have `postgres` database installed and proper driver `php-pgsql` package so that you can use `postgres` database with php7.1 in your project.
### Reference
* https://github.com/pacuna/Laravel-PGSchema* https://httpd.apache.org/docs/2.4/vhosts/name-based.html
* https://www.nginx.com/resources/wiki/start/topics/examples/server_blocks/