Coder Social home page Coder Social logo

siberfx / laravel-vue-spa-skeleton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yurich84/laravel-vue-spa-skeleton

0.0 1.0 0.0 855 KB

SPA modular Skeleton (Laravel + Vue + ElementUI + Bootstrap) with CRUD generator

License: MIT License

PHP 80.86% Vue 18.72% Blade 0.41%

laravel-vue-spa-skeleton's Introduction

Vue logo

I am currently working on a new Laravel Vue 3 project with Composition Api, Vite and Pinia as store manager.

MIT Licensed

This is a basement for a large modular SPA, that utilises Laravel, Vue, ElementUI.

CRUD generator is integrated in project creates standalone modules on the frontend and backend.

The main goals of the project are:

  • to avoid hard cohesion between modules
  • to form the basis for writing clean code
  • to be easy to expand
  • to avoid code duplication
  • to reduce the start time of the project
  • to reduce the time of project support and code navigation
  • to be understandable for an inexperienced programmer

Extensions

Install

  • git clone https://github.com/Yurich84/laravel-vue-spa-skeleton.git
  • cd laravel-vue-spa-skeleton
  • composer install
  • cp .env.example .env - copy .env file
  • set your DB credentials in .env
  • php artisan key:generate
  • php artisan migrate
  • yarn install

Testing

Unit Testing

php artisan test

Usage

  • npm run watch or npm run hot - for hot reloading
  • php artisan serve and go 127.0.0.1:8000
  • Create new user and login.

Creating module

You can easily create module with CRUD functionality.

php artisan make:module {ModuleName}

This will create:

  • migration database/migrations/000_00_00_000000_create_{ModuleName}_table.php

  • model app/Models/{ModuleName}.php

  • factory database/factories/{ModuleName}Factory.php

  • tests tests/Feature/{ModuleName}Test.php

  • backend module app/Modules/{ModuleName}/

{ModuleName}/
│
├── routes_api.php
│
├── Controllers/
│   └── {ModuleName}Controller.php
│
├── Requests/
│   └── {ModuleName}Request.php
│
└── Resources/
    └── {ModuleName}Resource.php
  • frontend module resources/js/modules/{moduleName}/
{moduleName}/
│
├── routes.js
│
├── api/
│   └── index.js
│
├── components/
│   ├── {ModuleName}List.vue
│   ├── {ModuleName}View.vue
│   └── {ModuleName}Form.vue
│
└── store/
    ├── store.js
    ├── types.js
    └── actions.js

After creating module, you can edit model and migration by adding fields you need. Also you can add this fields into view. Don't forget run php artisan migrate.

Every module loads dynamically.

laravel-vue-spa-skeleton's People

Contributors

dependabot[bot] avatar kinglefff avatar yurich84 avatar yuricht 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.