2017 © Pedro Peláez
 

library blog

image

romalytvynenko/blog

  • Friday, March 25, 2016
  • by romalytvynenko
  • Repository
  • 1 Watchers
  • 1 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Blog

This is basic blog package. It provides low-end features (DB architecture, editor, basic models) and not high-end logic(!)., (*1)

Installation

First of all, run migrations php artisan migrate --path=vendor/romalytvynenko/blog/database/migrations, (*2)

Or, if you want to add special columns create migration and extend it from Romalytvynenko\Blog\database\migrations\CreatePostsTable, then implement up() method, and add columns via Schema::table method. For, example we need add conference_id columns to post's table., (*3)

<?php

use Illuminate\Database\Schema\Blueprint;

class CreatePostsTable extends Romalytvynenko\Blog\database\migrations\CreatePostsTable
{
    /**
     * Run the migrations.
     *
     * @return void
    */
    public function up()
    {
        parent::up();

        Schema::table('posts', function (Blueprint $table) {
            $table->integer('conference_id')->after('user_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
    */
    public function down()
    {
        parent::down();
    }
}

After this you can run migration as always you do it: php artisan migrate, (*4)

Classes description

This package provides you base 2 classes: - Writer (trait) - Post, (*5)

Writer trait is basically for extending User, it provides features for users as authors., (*6)

Using scripts

By default package goes with Sir Trevor JS ( https://github.com/caouecs/Laravel-SirTrevorJS ). You can add it to the project by adding sir trevor's JS. Use bower to install dependencies and add it to the project., (*7)

Example of gulp.js (with elixir and installed bower components):, (*8)

var elixir = require('laravel-elixir');

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(function(mix) {
    mix.sass('app.scss');

    mix.scripts([
        "es5-shim/es5-shim.js",
        "es6-shim/es6-shim.js",
        "Eventable/eventable.js",
        "sir-trevor-js/sir-trevor.js",
    ], 'public/app.min.js', 'bower_components');
});

The Versions

25/03 2016

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Roman Lytvynenko