Skip to content

MonospaceTW/monosparta-diving-server

Repository files navigation

Dive In Taiwan - Server

This is a project in a trainee program of Mono-Sparta. It's an APP about diving. The project is basded on Laravel Framework 5.8.28

Installation

Windows

  1. Install VirtualBox

  2. Install Vagrant

  3. Install homestead
    All of requirements are in this virtual machine.

    $ vagrant box add laravel/homestead

  4. Install Composer
    It's a package for PHP.

  5. Setup laravel for composer

    $ composer require "laravel/homestead"

Make sure to place composer's system-wide vendor bin directory in your PATH so the laravel executable can be located by your system. > This directory exists in different locations based on your operating system; however, some common locations include: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin 

  1. Start a new laravel project

    $ laravel new projectName

  2. Test
    http://127.0.0.1/projectName/public/

If you still don't know how to install,please take laravel Installation as reference.

MacOS

  1. Install PHP

    $ brew install php

  2. Install Composer

  3. Install Laravel

  4. Install Laravel with Composer

    $ composer global require “laravel/installer”

Make sure to place composer's system-wide vendor bin directory in your PATH so the laravel executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include: $HOME/.composer/vendor/bin 

  1. Start a new laravel project

    $ laravel new projectName

  2. Install Valet
    Please take laravel Valet as reference.

Project Architecture

NAME PATH DESCRIPTION
Models of Database Table /app Article,Comment,Log,Shop,Spot,and User model
Controllers /app/Http/Controllers Article and Comment controller. Main is in TaskController.php
Routes /routes/api.php Search,Article,and Comment routes
Database /database migrations,seeds,factories

Restore Laravel Project

Because .gitignore will ignore some files,you must do this to restore the laravel project.
Open your terminal,direct PATH where you want to clone at,then follow commends below.

  1. git clone

    $ git clone https://github.com/MonospaceTW/monosparta-diving-server.git

  2. Reinstall composer
    It will reconstruction content in the index of vendor.

    $ cd monosparta-diving-server
    $ composer install

  3. Restore the index of node_modules

    $ npm install

  4. Restore .env

    $ cp .env.example .env
    $ php artisan key:generate

    Open .env,then check databese,username,and password are correct.
    For example,

    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=yourDatabaseName
    DB_USERNAME=yourUsername
    DB_PASSWORD=yourPassword
    

If you use Homestead,you need more steps.

  1. Restore Homestead.yaml

    $ php vendor/bin/homestead make

  2. Start Homestead

    $ vagrant up

  3. Sign in Homestead,and restore database

    $ vagrant ssh
    $ cd public_html/yourProjectName
    $ php artisan migrate

API Document

You can check API list at API Document.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages