Code Monkey home page Code Monkey logo

code_base's Introduction

About Base Laravel v5.4.x

Build Status

Code base with Api application and Web application

I use docker shincoder/homestead && mariadb

  • Design pattern
  • Use Mysql or mongodb
  • Authenticate with passport
  • Permission with policies
  • Yajra/Datatables
  • Dependencies with bower & npm
  • Use Laravel mix compiling assets

You can sign in with account demo

account: [email protected]/secret

Required

  • Git
  • Composer
  • PHP v.7.x
  • MySql v.5.7.x
  • Node
  • Npm
  • bower
  • webpack

Setup for project with Mongodb

Make sure you have the MongoDB PHP driver installed. You can find installation instructions at http://php.net/manual/en/mongodb.installation.php

$ git clone [email protected]:dung13890/code_base.git
$ cd project
$ composer install --no-scripts
$ cp .env.mongo .env
$ php artisan key:generate
$ php artisan db:seed --class=UsersMongoSeeder

In App\Providers\RepositoryServiceProvider Change singleton Mongo instead of Mysql

Setup for project with Api

$ git clone [email protected]:dung13890/code_base.git
$ cd project
$ composer install --ignore-platform-reqs --no-interaction
$ cp .env.example .env
$ php artisan key:generate

Setup for project with Web application

$ git clone [email protected]:dung13890/code_base.git
$ cd project
$ composer install --ignore-platform-reqs --no-interaction
$ npm install
$ bower install
$ cp .env.example .env
$ php artisan key:generate

Create Database

$ mysql -u username -psecret

mysql> create database laravel_db;
mysql> exit;

Config environment

$ vim .env

Change DB_DATABASE, DB_USERNAME and DB_PASSWORD

Migrate && seed data factories

$ php artisan migrate:refresh --seed

Start API application

# Setup passport run only once
$ php artisan passport:install

# Creating A Password Grant Client
$ php artisan passport:client --password

# Copy API_CLIENT_SECRET and API_CLIENT_id To .env

Start web application production

$ npm run production

Start web application Dev

$ npm run dev or $ npm run watch

Test

$ ./vendor/bin/phpunit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.