<commit_before><?php namespace Bican\Roles;

use Illuminate\Database\Eloquent\Model;

class Role extends Model {

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['label', 'name', 'level'];

    /**
     * Role belongs to many permissions.
     *
     * @return mixed
     */
    public function permissions()
    {
        return $this->belongsToMany('Bican\Roles\Permission');
    }

    /**
     * Attach permission or permissions.
     *
     * @param int|array|Permission $permission
     * @return mixed
     */
    public function attachPermission($permission)
    {<commit_msg>add users relationship to role<commit_after><?php namespace Bican\Roles;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Console\AppNamespaceDetectorTrait;

class Role extends Model {

    use AppNamespaceDetectorTrait;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['label', 'name', 'level'];

    /**
     * Role belongs to many permissions.
     *
     * @return mixed
     */
    public function permissions()
    {
        return $this->belongsToMany('Bican\Roles\Permission');
    }

    /**
     * Role belongs to many users.
     *
     * @return mixed
     */
    public function users()
    {
        return $this->belongsToMany($this->getAppNamespace().'User');
    }

    /**
     * Attach permission or permissions.
     *
     * @param int|array|Permission $permission
     * @return mixed
     */
    public function attachPermission($permission)
    {
{'fraction_non_alphanumeric': 0.11772072636192861, 'fraction_numerical': 0.0, 'mean_word_length': 2.3430962343096233, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5362166', 'n_tokens_mistral': 456, 'n_tokens_neox': 455, 'n_words': 112}