Coder Social home page Coder Social logo

jlabs / gravity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bubalubs/gravity

0.0 0.0 0.0 1.51 MB

Laravel package that sets up a light flexible CMS with an admin control panel

JavaScript 1.24% PHP 41.54% Vue 23.31% Blade 30.22% SCSS 3.69%

gravity's Introduction

Latest Stable Version License

Gravity is a Laravel package that sets up a light flexible CMS with an admin control panel

screenshot

Installation

Install using composer

composer require bubalubs/gravity

Create database tables by running migrations

php artisan migrate

Publish CSS/JS files for admin control panel

php artisan vendor:publish --tag=public

Add the HasRoles Trait to your User model

use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable
{
    use Notifiable, HasRoles;

    ...

Entities (Models)

Entities allow you to work with a custom Laravel model and adds CRUD options to the admin.

To work with images on an entity your model must implement the following interface and trait:

use Illuminate\Database\Eloquent\Model;
use Spatie\MediaLibrary\HasMedia\HasMedia;
use Spatie\MediaLibrary\HasMedia\HasMediaTrait;

class YourModel extends Model implements HasMedia
{
    use HasMediaTrait;
    
    ...

Customizing Views

Publish view files to your laravel view directory then edit them to make changes

php artisan vendor:publish --provider=Bubalubs\Gravity\GravityServiceProvider

Updating

Update to the latest views (This will overwrite any changes you have made)

php artisan vendor:publish --provider=Bubalubs\Gravity\GravityServiceProvider --tag=public --force

Thanks

Thanks to spatie for their awesome libraries that this package relies on for permissions and media library!

gravity's People

Contributors

bubalubs 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.