2017 © Pedro Peláez
 

library laravel-support

Laravel support package. Used by other Taskforcedev packages.

image

taskforcedev/laravel-support

Laravel support package. Used by other Taskforcedev packages.

  • PHP
  • 7 Dependents
  • 4 Suggesters
  • 3 Forks
  • 1 Open issues
  • 32 Versions
  • 7 % Grown

The README.md

laravel-support

Support package for Taskforcedev Laravel packages., (*1)

Provides a consistant way to get user specified layouts, sitename, and user administration rights (using conventions on the user model - if applicable)., (*2)

Build Status:

1.0.x (Laravel 5.3): Build Status, (*3)

1.1.x (Laravel 5.4): Build Status, (*4)

Requirements

  • Laravel 5.3+

Features

  • Provides a 'base' controller which can be extended to ensure all views have access to the buildData method.
  • Provides a single place to edit config for all Taskforcedev packages (other packages are free to require this also).
  • Provides authorization helper support if your user model follows some of our known conventions.
  • Provides user model namespace detection, allows packages to interact with the user model easily.

Installation

Add the following line to your composer require: (not necessary if you already have a package which depends on laravel-support), (*5)

Laravel 5.3, (*6)

"require": {
    "taskforcedev/laravel-support": "1.0.*"
},

Laravel 5.4, (*7)

"require": {
    "taskforcedev/laravel-support": "1.1.*"
},

Then if you don't already have the following entry in your config/app.php add it also:, (*8)

Taskforcedev\LaravelSupport\ServiceProvider::class,

Configuration

This package provides a single place where the following can be configured and used by packages which use this., (*9)

  • Layout (which layout to use, provides all packages the same visual theme if set to your own custom layout.)., (*10)

  • Frameworks, allows you to specify which frameworks are enabled in your layouts - Other packages can then use this information to load appropriate displays., (*11)

Publish Config

In order to edit the configuration please run the following command to publish the taskforce-support.php file into your apps config directory, (*12)

php artisan vendor:publish --tag="taskforce-support", (*13)

Controller

The package provides a controller which if extended by your own controllers will provide the method buildData($data = []) which allows all controllers to access the same set of shared data., (*14)

As well as the shared data the method also accepts an array for which these extra values will be added to the data object., (*15)

Example:, (*16)

use Taskforcedev\LaravelSupport\Http\Controllers\Controller

class MyController extends Controller
{
    public function index()
    {
        $data = [
            'title' => 'My Page',
            'description' => 'This is my page',
        ];
        $data = $this->buildData();
        return view('myview', $data);
    }
}

Helpers

User

Get the user model

This can then be used in eloquent relations within packages to prevent hardcoding or configuring user model in external config. Or anywhere else where you need the model name of user model., (*17)

Example
use Taskforcedev\LaravelSupport\Helpers\User as UserHelper;

Class whatever
{
    public function author() {
        $userHelper = new UserHelper();</code>
        $model = $userHelper->getUserModel();
        return $this->belongsTo($model);
    }
}

Contributing

Issues and pull requests are always appreciated, particularly anything relating to the new UI facade., (*18)

Please ensure any PHP is PSR-2 standard., (*19)

For anything else please raise a gihub issue., (*20)

The Versions

06/02 2018

1.1.x-dev

1.1.9999999.9999999-dev

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

06/02 2018

v1.1.7

1.1.7.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

19/01 2018

v1.1.6

1.1.6.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

14/12 2017

1.0.x-dev

1.0.9999999.9999999-dev

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

14/12 2017

v1.0.20

1.0.20.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

14/12 2017

v1.1.5

1.1.5.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

14/12 2017

v1.1.4

1.1.4.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

14/12 2017

v1.0.19

1.0.19.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

14/12 2017

dev-master

9999999-dev

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

01/09 2017

v1.1.3

1.1.3.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

20/03 2017

v1.1.2

1.1.2.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

20/03 2017

v1.0.18

1.0.18.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

02/02 2017

v1.1.1

1.1.1.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

26/01 2017

v1.1.0

1.1.0.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

20/01 2017

v1.0.17

1.0.17.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

20/01 2017

v1.0.16

1.0.16.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

20/01 2017

v1.0.15

1.0.15.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

20/01 2017

v1.0.14

1.0.14.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

19/01 2017

v1.0.13

1.0.13.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

23/12 2016

v1.0.12

1.0.12.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

16/12 2016

v1.0.11

1.0.11.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

16/11 2016

v1.0.10

1.0.10.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

14/11 2016

v1.0.9

1.0.9.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

The Development Requires

by Avatar Taskforcedev

laravel support

12/05 2016

v1.0.8

1.0.8.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support

07/12 2015

v1.0.7

1.0.7.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support

07/12 2015

v1.0.6

1.0.6.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support

06/12 2015

v1.0.5

1.0.5.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support

22/10 2015

v1.0.4

1.0.4.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support

30/09 2015

v1.0.3

1.0.3.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support

30/09 2015

v1.0.2

1.0.2.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support

30/09 2015

v1.0.1

1.0.1.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support

30/09 2015

v1.0.0

1.0.0.0

Laravel support package. Used by other Taskforcedev packages.

  Sources   Download

The Requires

 

by Avatar Taskforcedev

laravel support