1. Go to this page and download the library: Download smarch/watchtower library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
smarch / watchtower example snippets
/*
* Third Party Service Providers
*/
Caffeinated\Shinobi\ShinobiServiceProvider::class, // For RBAC
Collective\Html\HtmlServiceProvider::class, // For Watchtower Forms to function
Smarch\Watchtower\WatchtowerServiceProvider::class, // For Watchtower
/*
* Third Party Service Providers
*/
'Form' => Collective\Html\FormFacade::class, // nobi\Facades\Shinobi::class, // For RBAC functions
//'Watchtower'=> Smarch\Watchtower\WatchtowerFacade::class, // not
namespace App;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Caffeinated\Shinobi\Traits\ShinobiTrait;
class User extends Model implements AuthenticatableContract,
CanResetPasswordContract
{
use Authenticatable, CanResetPassword, ShinobiTrait;
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Caffeinated\Shinobi\Traits\ShinobiTrait;
class User extends Authenticatable
{
use Notifiable;
use ShinobiTrait;