Git Product home page Git Product logo

teams's People

Contributors

absolutemate avatar jurager avatar saade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

teams's Issues

Invitation Methods

I would like to know how I use the invite methods, for me the documentation is a little confusing in this part. How do I invite by email?

Cannot serve after installing

After I installed the package using the documentation, I get the following error when running php artisan serve:

   Exception

  Error, configured model App\Models\User not exists

  at vendor/jurager/teams/src/TeamsServiceProvider.php:90
     86▕                 throw new Exception('Error, missing '.$model.' model configuration');
     87▕             }
     88▕
     89▕             if (! class_exists(config('teams.models.'.$model))) {
  ➜  90▕                 throw new Exception('Error, configured model '.config('teams.models.'.$model).' not exists');
     91▕             }
     92▕
     93▕             Teams::setModel($model, config('teams.models.'.$model));
     94▕         }

      +8 vendor frames

  9   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}()
      +5 vendor frames

  15  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()

My User Model looks the following:

<?php

namespace App\Models;
namespace App\Providers;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

use Jurager\Teams\Traits\HasTeams;

class User extends Authenticatable
{
    use HasTeams, HasApiTokens, HasFactory, Notifiable;

...

What am I missing?

Error when running composer

On the very first step when running composer required i get a class error

$ composer require jurager/teams
./composer.json has been updated
Running composer update jurager/teams
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals

  • Locking jurager/teams (2.4.3)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
  • Downloading jurager/teams (2.4.3)
  • Installing jurager/teams (2.4.3): Extracting archive
    Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
    Package paypal/rest-api-sdk-php is abandoned, you should avoid using it. No replacement was suggested.
    Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
    Generating optimized autoload files

In ClassLoader.php line 305:

A non-empty PSR-4 prefix must end with a namespace separator.

can you confirm if this is something I have to fix first my end?

Teams::role is undefined

This package looks promising and has everything, in simple words the most complete package but things aren't working either the read me isn't updated or maybe I have missed something.

Teams::defaultApiTokenPermissions(['read']);
    
Teams::role('admin', 'Administrator', [
    'server:create',
    'server:read',
    'server:update',
    'server:delete',
])->description('Administrator users can perform any action.');

Teams::role('support', 'Support Specialist', [
    'server:read',
])->description('Support specialists can read server information.');

In TeamsServiceProvider, not able to define role,

Ability::firstOrCreate([ 'name' => 'edit', 'title' => 'Edit' ]);

Doesn't work either the team_id is missing. How can one define global roles and abilities for teams?

If you could setup a demo app I can help you write documentation? plus demo app will be helpful understanding the lifecycle and flow of package?

Possible to use without groups?

Hi

Great library, came here after becoming immensely frustrated with the Spatie experience.

Is it possible to use this library without groups?

We already have groups (of other models) which belong to our teams, so extending this libraries Team is problematic.

Thank you

user migration is overwritten

When issuing the install command the users table migration is overwritten

now, while I do understand that new fields is needed on the user there is a few issues with the 'silent' approach :)

Installing the package in an exiting Laravel app will not work
If the migration has been executed before then publishing and overwriting the migration file does not have any effect
It's not mentioned in the doc, so one does not know that migration is needed.

It would be better to have a add_fields_to_users_table migration or document which new fields are needed

Issue with Team->users or allUsers

I encountered an issue after installing the latest version. When attempting to retrieve all the users associated with the team, I received the following error message:

Column not found: 1054 Unknown column 'team_user.role'.

The migration specifies 'role_id' as the column name, but in the 'Team.php' model, it appears that you're trying to pivot using the 'role' column:

public function users(): BelongsToMany
{
    return $this->belongsToMany(Teams::$userModel, Teams::$membershipModel)
        ->withPivot('role')
        ->withTimestamps()
        ->as('membership');
}

This mismatch between the expected 'role_id' column and the 'role' column used in the model may be causing the issue.

What's the status of this repo?

Can we expect to see some elaborate documentation or are we supposed to guess our way forwards?
Nowhere does it say

  • how to add abilities
  • how to add permissions
  • how to add teams
  • what the intended workflow should be
  • how to use the supplied actions without errors
  • how test this

Can we assume this is abandoned? If so, could you please inform on the readme that this is not intended for install.

Thanks in advance

More info for Group model

Can you please explain the logic behind "group" relationship. I'm trying to make some basic "CRUD" GUI for this package in order to test everything and to understand how everything works, but got stuck with 'Class "App\Models\Group" not found' error because of eager loaded relation in 'Team' class... TBH, I'm a noob when it comes to digging into PHP/Laravel OO code, I'm hoping that you'll be able to give us some more examples/docs soon. Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.