PHPackages                             farbesofts/checkrolepast - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. farbesofts/checkrolepast

ActiveLibrary[API Development](/categories/api)

farbesofts/checkrolepast
========================

A API Library for Laravel

1.0(7y ago)48MITPHPPHP &gt;=5.6.4

Since Mar 19Pushed 7y ago2 watchersCompare

[ Source](https://github.com/farbesofts/checkrolepast)[ Packagist](https://packagist.org/packages/farbesofts/checkrolepast)[ RSS](/packages/farbesofts-checkrolepast/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Farbesoft CheckRolePast
=======================

[](#farbesoft-checkrolepast)

[![Laravel 5.5](https://camo.githubusercontent.com/8bfaefdf695ac3ff6cde30f94f554ea371c76f3156c48be6720a6fc85518cf0a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d352e332d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)[![Source](https://camo.githubusercontent.com/cc32803bac0e9afeef06878127fee58a2d1084a2f05fc9f063bc9c19b68096c0/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d6661726265736f6674732f636865636b726f6c65706173742d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/farbesofts/checkrolepast)[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://tldrlegal.com/license/mit-license)

checkRole is a simple and lightweight library that provides developers with a useful tool when creating login restrictions in personalized schedules by users to a specific role in the system.

- Every user has a single schedule defined.

Documentation
-------------

[](#documentation)

(Comming Soon)

Quick Installation
------------------

[](#quick-installation)

Begin by installing the package through Composer. The best way to do this is through your terminal via Composer itself:

```
composer require farbesofts/checkrolepast

```

Configuration
-------------

[](#configuration)

To publish the config file and NotAccess view, run the following:

```
php artisan vendor:publish

```

Choose the option where the library is located, in my case:

```
[2] Provider: Farbesofts\Checkrolepast\CheckrolepastServiceProvider

```

### Service Provider

[](#service-provider)

- copy the following in config.app (array Providers)

```
Farbesofts\Checkrolepast\CheckrolepastServiceProvider::class,
```

### Middleware kernel.php

[](#middleware-kernelphp)

- copy on App\\Http\\Kernel.php -&gt; (array $routeMiddleware):

```
'CheckRolePast' => \Farbesofts\Checkrolepast\Middleware\CheckRolePast::class,
```

### Migrations

[](#migrations)

- Migrate the models

```
php artisan make:auth
php artisan migrate

```

If you are using a library of roles and permissions, before to migrate on config/checkrolepast.php to change 'run-migrations' =&gt; false, and only you migrate:

```
2019_03_16_160254_create_timetables_table

```

### Header on User Model

[](#header-on-user-model)

- Copy on App\\User.php Model:

```
use Farbesofts\Checkrolepast\Models\Role;
use Farbesofts\Checkrolepast\Models\Timetable;
use Illuminate\Support\Facades\Auth;
```

### Methods on User Model

[](#methods-on-user-model)

```
    public function roles()
    {
        return $this->belongsToMany(Role::class)->withTimestamps();
    }

    public function hasRole($role)
    {
        if ($this->roles()->where('name', $role)->first()) {
            return  true;
        }
        return false;
    }

    public function Timetable(){
        return $this->hasOne(Timetable::class);
    }

    public function getTimetable(){
        return $this->Timetable()->where('user_id',Auth::user()->id)->first();
    }
```

### Routing with CheckRolePast Middleware

[](#routing-with-checkrolepast-middleware)

- Copy on routes\\web.php: example (Role:admin)

```
Route::get('/notaccess', function () {
    return view('notaccess');
});
Route::group(['middleware' => 'CheckRolePast:admin'], function() {
    Route::get('/home', 'HomeController@index')->name('home');
});
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2611d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bb90e9f0c84457391c5872364c7261674f7768492a7a33bdec12be83d927e61?d=identicon)[farbesofts](/maintainers/farbesofts)

---

Top Contributors

[![farbesofts](https://avatars.githubusercontent.com/u/48660904?v=4)](https://github.com/farbesofts "farbesofts (6 commits)")

---

Tags

clientlaravellibrary

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/farbesofts-checkrolepast/health.svg)

```
[![Health](https://phpackages.com/badges/farbesofts-checkrolepast/health.svg)](https://phpackages.com/packages/farbesofts-checkrolepast)
```

###  Alternatives

[codedredd/laravel-soap

A SoapClient wrapper integration for Laravel

221516.6k3](/packages/codedredd-laravel-soap)[gorkalaucirica/hipchat-v2-api-client

Hipchat v2 API client

80223.4k6](/packages/gorkalaucirica-hipchat-v2-api-client)[jubaer/zoom-laravel

A comprehensive Zoom integration package for Laravel, providing easy-to-use API functionality to interact with the Zoom platform using PHP.

58107.8k](/packages/jubaer-zoom-laravel)[teknoo/sellsy-client

PHP library to connect your applications to your Sellsy account account using the Sellsy API and build your websites and your platforms on the Sellsy technology.

18195.6k](/packages/teknoo-sellsy-client)[nikolag/laravel-square

Square API integration with Laravel built on nikolag/core

3827.3k](/packages/nikolag-laravel-square)[thehocinesaad/stability-laravel

Stability Laravel is a comprehensive Laravel API client designed for seamless interaction with the Stability AI API.

111.3k](/packages/thehocinesaad-stability-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
