Giter Site home page Giter Site logo

gitter-badger / laravel-angular-cms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devmark/laravel-angular-cms

0.0 1.0 0.0 1.41 MB

laravel api with angular backend cms

License: MIT License

PHP 36.17% JavaScript 24.70% ApacheConf 0.20% HTML 18.09% CSS 20.84%

laravel-angular-cms's Introduction

Laravel Angular CMS Starter Site

screenshot

Features:

  • Independent Laravel, Angular
  • Laravel 5.1 for API
    • Include Json Auth Token
    • Include Data Transformer
    • Include API Data Exception
    • Output JSON or others
    • Include CSRF Protection
    • Timezone
  • Angular 1.4 for Backend
    • Include AdminLTE template
    • Include ui-router, Restangular etc ...
    • Timezone
    • Support Multi-Languages interface
  • Backend
    • User & Role management
    • Manage Media & Media Categories
    • Manage posts and posts categories
  • Frontend
    • Soon

Install:


Step 1: Get the code

https://github.com/devmark/laravel-angular-cms/archive/master.zip


Step 2: Init api

Init Laravel

  1. Move to api directory
  2. Run composer install

Init Database

  1. Setup database config in .env file (copy from .env.example)
  2. Run php artisan migrate --seed

Step 3: Init Backend

This project makes use of Bower. You must first ensure that Node.js (included in homestead) is installed on your machine.

  1. Install npm, gulp, bower
  2. Run sudo npm install
  3. Run bower install
  4. Edit backend/src/index.js, replace cms.dev to your api domain
  5. Run gulp serve for development

Step 4: Production

API

  1. edit .env file set APP_DEBUG to false

Backend

  1. run gulp in backend directory
  2. copy backend/dist all files to api/public/assets-backend

Frontend

  1. Move all frontend files to api/public

Server

Redirect backend:

Nginx
    location ~ ^/backend {
        rewrite ^/backend(.*) /assets-backend/$1 break;
    }
Apache
    RewriteRule ^backend/(.*)\.([^\.]+)$ /assets-backend/$1.$2 [L]

Step 5: Start

  1. access http://yourdomain.com/backend You can now login to admin:

    username: [email protected] password: adminmark


Demo:

Soon


Screenshot:

screenshot screenshot screenshot


API Detail:

Soon

Add Exception

Add Whatever Exception you want in api/app/Exceptions

Example:

class EmailOrPasswordIncorrectException extends HttpException
{
    public function __construct($message = null, \Exception $previous = null, $code = 0)
    {
        parent::__construct(401, 'Email/Password is incorrect', $previous, [], 10001);
    }
}

Use it:

    throw new EmailOrPasswordIncorrectException;

Output:

{
    "result":{
        "status":false,
        "code":10001,
        "message":"Email\/Password is incorrect"
    }
}

Add Transformer

Soon

Config JWT

Soon

Backend Detail:

  1. run gulp in backend directory
  2. copy backend/dist all files to api/public/assets-backend

Frontend Detail:

  1. You can move all frontend file to api/public

laravel-angular-cms's People

Contributors

devmark avatar

Watchers

 avatar

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.