2017 © Pedro Peláez
 

library backstory

Backstory

image

shawnsandy/backstory

Backstory

  • Thursday, January 18, 2018
  • by shawnsandy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Backstory (beta)

Tell Your Story.

Backstory is a Laravel package for creating and editing, content in your laravel application., (*1)

Features

  • Easily integrate into your application
  • WYSIWYG editor powered by CKEditor
  • Simple and easy image management
  • Dynamic on the fly image resizing using PHPGlide
  • OEMBED support
  • Easy to customize
  • more features coming soon.

Install

  • Installs using composer repositories add the following to your composer.json file

``` json, (*2)

"repositories": [ { "type": "vcs", "url": "https://github.com/shawnsandy/backstory" } ],, (*3)


- Run the composer require to install the package ``` bash composer require shawnsandy/backstory dev-master

In Laravel 5.5 and higher the package automatically installs itself. If you are running Laravel 5.4 or earlier please follow the instructions below.

  • Add the provider to your config\app.php providers.
ShawnSandy\Backstory\BackstoryServiceProvider::class,
  • Add the facade to your config/app.php alias.
"Backstory" => ShawnSandy\Backstory\BackstoryFacade::class,

Routes

  • Add the route(s) to your routes\web.php

``` php, (*4)

Backstory::routes();, (*5)


__Optional Routes__ ### Images Driver Add the images driver to the `config\filesystem.php` ``` php 'images' => [ 'driver' => 'local', 'root' => base_path('/public'), 'url' => env('APP_URL').'/public', 'visibility' => 'public',

Publish vendor assets files

  • Publish vendor assets and files
php artisan vendor:publish --tag=backstory-assets
php artisan vendor:publish --tag=backstory-vendor-assets

Migrate

Run php artisan migrate to setup backstory tables, (*6)

php artisan migrate

Traits

Add the following traits to your App/User.php, (*7)

User extends Authenticatable {
  use  Storify, HasRolesAndAbilities;
    ...
}

Dependencies

Backstory requires the following dependencies, (*8)

Img FLY, (*9)

Install ImgFly - adds dynamic image resizing download and full instructions, (*10)

Installs using composer repositories add the following to your composer.json file, (*11)

``` php, (*12)

"repositories": [ { "type": "vcs", "url": "https://github.com/shawnsandy/img-fly" } ],, (*13)

- Run the composer require to install the package

composer require shawnsandy/img-fly dev-master, (*14)


__Larvel Blade Directives__ - Run the composer require to install the package ``` php composer require appstract/laravel-blade-directives

Scripts / Styles, (*15)

  • When adding Backstory to your custom pages add the following to your page umbrellajs and custom scripts to your layout blade

``` blade @stack('scripts') @stack('inline-scripts'), (*16)


- Include the scripts on your editor / update blade (view) ``` php @include("backstory::partials.scripts")

Demo / Usage

Backstory comes with a prebuilt sample of the application that you can use to demo its functionalities and features. Dive the code for examples on how to integrate backstory in your app (tutorials coming soon)., (*17)

  • Once installed you can view and create articles by visiting yourapp.com/backstory
  • Add some categories-- hit add categories button and add a coupe categories before you continue.
  • Click the create new story button
  • Now go ahead got ahead and create your story

TODO

  • [ ] Add restful api for stories
  • [ ] Ajaxify / Reactive forms
  • [ ] Add vue/react components
  • [ ] Bootstrap 4 views
  • [ ] Improve the docs

Change log

Please see CHANGELOG for more information on what has changed recently., (*18)

Testing

bash $ composer run phpstan, (*19)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*20)

Security

If you discover any security related issues, please email shawnsandy04@gmail.com instead of using the issue tracker., (*21)

Credits

License

The MIT License (MIT). Please see License File for more information., (*22)

The Versions