Download the PHP package smarch/watchtower without Composer

On this page you can find all versions of the php package smarch/watchtower. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package watchtower

Laravel 5.1 Packagist Version Total Downloads GitHub stars

The Watchtower

For Laravel 5.3 use the develop branch. Make sure you add the necessary Shinobi lines to your User model to get the permissions to work.

A front end (GUI) package for the Caffeinated/Shinobi RBAC authorization system for Laravel 5.

enter image description here

This page is intended for installation, please check out the wiki for more information about usage.

Overview

This package is to administer / manage your roles and permissions tables with the Shinobi role based access control system for Laravel 5.

:hand: Note: Shinobi is a required part of this package. This package is merely the GUI front end for the Shinobi package and this Watchtower package does not actually provide any of the authorization functionality. If you don't already have the Shinobi package installed, it will be installed as part of the installation of Watchtower.

It will give you full control over your roles :busts_in_silhouette:, their permissions :key: and the users :bust_in_silhouette: that have access to them. You will be able to add, edit, update, delete and synchronize all three as needed.

Out of the box, Watchtower contains all the views necessary to enable Role & Permissions management. It also provides the necessary permissions to secure your site so that only those allowed to perform the admin functions are permitted. Of course, this is made possible using Shinobi and, naturally, all views and permissions are configurable so you are free to provide your own views and change the permissions the way your app requires them.


Example of the user matrix

The User Matrix

Installation

Depending on whether or not you have already installed Shinobi, your install is pretty straightforward. Install Watchtower, add Service Providers, add Facade, run DB commands. Win.

:hand: Note Even though Watchtower uses a few packages to properly theme and layout the admin area, they are referenced through cdnjs.com and are not installed locally.

Watchtower makes use of the following packages : Bootstrap, Bootstrap theming, JQuery, Pace, Sweetalert and Modernizr. If you wish to not use the cdn versions and use local versions instead, modify the master.layout file to reflect those changes. (Or alternately, use the config file to point your master.layout to your local copies of those packages.)

:black_square_button: Composer

For Laravel 5.0 - 5.2 you can simply run this line at the command prompt.
 composer require "smarch/watchtower"
For Laravel 5.3 put the following line in your composer.json file.
"smarch/watchtower": "@dev"

:pencil: Service Provider

Once composer has installed the necessary packages for watchtower to function you need to open your laravel config page for service providers and add Watchtower. To properly function you need to have all 3 service providers referenced : Shinobi, HTML Forms and Watchtower.

config/app.php

:pencil: Facades

While Watchtower itself does not need a facade, one is provided if you wish to use one. However the Shinobi and Forms facades are used heavily by Watchtower so be sure you add them to your Facades.

config/app.php

:card_index: Database Migrations / Seeds

If you did not install Shinobi earlier, you will need to run the migration files to properly set up and create the necessary tables. From your command prompt (wherever you run your artisan commands) enter the following command php artisan vendor:publish and then php artisan migrate. This should properly create your necessary tables AND create the Watchtower config file (which allows you to define any views / permissions you wish to change from their defaults).

:hand: Note If you already have your roles and permissions set up, you can skip the following step and just change the Watchtower config file to reflect the permissions it should use to permit functionality.

To permit the ability to restrict and permit access to the various admin areas of Watchtower, you will need to run the Watchtower seeder which will prepopulate your database with permissions and roles.

php artisan db:seed --class Smarch\Watchtower\Seeds\WatchtowerTableSeeder

:memo: Shinobi usage requirements

If you are installing Shinobi now, with Watchtower, you will need to also make the following changes so that you can use Shinobi's RBAC functions instead of Laravel defaulting to its own "Gate" authorization methods. Modify your User model to reflect the following changes (stripping out Laravel's Authorizable contracts and traits) :

For Laravel 5.3 your User model should look like this :

Once this is all finished, you should be able to go to

:earth_americas: http://yoursite/watchtower

and be rewarded with a big ole warning. :smile: That's normal. This shows you that Shinobi is working and properly protecting your admin (Watchtower) area. Just login with [email protected] and password (if you used the db:seed command) and you will have full access. If you already had a user in your database, log in with that first user to enable access. By default, the db:seed command will associate the admin role withuser->id = 1in the database.

:hand: Note If you have not setup a login redirect yet, and don't have a HOME route and view, you will probably get another route error. Create a route for Home or redirect your logins or just type the url of http://yoursite/watchtower again.

:exclamation: Laravel Authentication Views (login, etc...)

Laravel 5.2

Now you can use artisan to make all your auth views and routes using the following command :

php artisan make:auth

This will generate the routes / views you need for authentication to work for you.

Laravel 5.1

Watchtower does not ship enabled (see note below after routes) with the default laravel authentication views/routes, since Laravel removed them in 5.1. However you can find some samples / information from Laravel here : Laravel Login / Auth Views that will provide you with the routes / views necessary to permit login and registration.

You will need the following routes for authentication. (also provided on Laravel auth link above) Copy these into your app/routes.php file (or wherever you define your routes).

routes.php 

:hand: Note As a convenience, the default Laravel auth views are included with Watchtower in the "vendor\smarch\watchtower\src\Views\auth" folder. Simply copy and paste the auth folder to your "root\resources\views" folder on your app to enable them.

:trident: Why "Watchtower"?

I've been a DC geek for over 30 years now. Watchtower is the name of the floating spacestation the Justice League used to monitor / administer the super heroes. ....coulda been worse. I was thinking of going with OMAC for a while. :smile:


All versions of watchtower with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version ~5.1
laravelcollective/html Version ~5.1
caffeinated/shinobi Version ~2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smarch/watchtower contains the following files

Loading the files please wait ....