chadsaun / phpvms

phpvms re-imagined on laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phpvms 7

Build Status Codacy Badge Total Downloads Latest Stable Version Latest Unstable Version License

The next phpvms version built on the laravel framework. work in progress. If you're looking for the old, phpVMS classic, it's available here.

installation

run the following commands. for right now, we're running on sqlite. for mysql, set DB_CONNECTION to mysql in the .env file.

cp .env.dev.example .env
composer install --no-interaction
php artisan database:create
php artisan migrate:refresh --seed

then point your webserver to the /public folder. for example, in nginx:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /var/www/laravel/public;
    index index.php index.html index.htm;

    server_name localhost;

    location / {
            try_files $uri $uri/ =404;
    }
}

development environment

For development, copy the included .env.dev.example to .env file. By default, it uses sqlite instead of mysql. This makes it much easier to be able to clear the database and new fixtures.

The easiest way to load locally is to install Laravel Valet (if you're running a Mac). Once you install it, go to your phpvms directory, and run:

cp .env.dev.example .env
php artisan key:generate
make install   # this will install everything
valet link phpvms

Now going to http://phpvms.dev should work. If you want to use mysql, follow the valet directions on installing mysql (brew install mysql) and then update the .env file to point to the mysql.

The default username and password are "admin@phpvms.net" and "admin". To see the available users in the development environment, see this file

creating/resetting the environment

I use Makefiles to be able to quickly setup the environment.

# to do an initial setup of the composer deps and install the DB
make install

Then to reset the database/clear cache, use:

make reset

database seeding

There is a database/seeds/dev.yml which contains the initial seed data that can be used for testing. For production use, there is a prod.yml file. The make reset handles seeding the database with the data from the dev.yml.

virtual machine

Using Laravel Homestead is one way to get your dev environment working if you're on Windows or don't want to install any Homebrew services on your Mac. Follow their instructions for install. A Vagrantfile and Homestead.yaml is included here. Add this to your /etc/hosts:

127.0.0.1       phpvms.app

And then to launch:

vagrant up

And then accessing it via http://phpvms.app should just work.

(TODO: redis information, etc)

updating

extract files and run the migrations:

php artisan migrate

About

phpvms re-imagined on laravel

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:CSS 71.4%Language:PHP 17.1%Language:HTML 10.0%Language:JavaScript 1.4%Language:Makefile 0.1%