GithubHelp home page GithubHelp logo

groups's People

Contributors

akwetey avatar deefaze avatar jny986 avatar musonza 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

groups's Issues

AddMembers issue

Hello @musonza I hope you are doing well.
Is it normal that when I use the groups->addMembers method
I get all the old members deleted from the group ?
I want to add new members to the actual members
This is the code I used

public function ajouterEleve(Request $request){
       
        $eleves =$request->input('eleves');
        $id=$request->input('groupId');
        $group=  Groups::group($id);
        $group->addMembers($eleves);

        return redirect()->back();
    }

can you explain this please

 public function addMembers($members)
    {
        if (is_array($members)) {
            $this->users()->sync($members);
        } else {
            $this->users()->attach($members);
        }

        return $this;
    }

Clarify installation

Hi
I'm working on laravel 5.8 and after install with composer i'm update manually the files config/app.php and
also manually update the databases after the run command "php artisan migrate" i'm receive as output the following error
php artisan migrate
Migrating: 2019_04_30_125539_create_groups_tables

Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table groups add constraint groups_user_id_foreign foreign key (use r_id) references users (id) on delete cascade)

for what reasons?

Call to a member function addMembers() on null

Hello Support,
Hope your are doing well, I am new in laravel, today i have installed your package in my laravel app. But when i am going to add member its saying Call to a member function addMembers() on null. please help me with this issue.

Thanks

add member to a group

Hello sir,

I am trying from yesterday to add member but I could not understand your functionality. can you please write the code for adding member into a group. Please sir this package is very important for my project. I am waiting for your kind response.

Thanks

how to added another attribute to groupe $Data

Hello how can I add another attribute to the array $data when creating a groupe I tryed :
but it's not working

[public function store(Request $request){
$userId=Auth::User()->id;

    $filiereid = $request->input('filiere');

    $data= [
    'name'              => $request->input('groupename'),
    'description'       => '', // optional
    'short_description' => '', // optional
    'filiere_id'        => $filiereid,

    'image'             => '', // optional
    'private'           => 0,  // 0 (public) or 1 (private)
    'extra_info'        => '', // optional
    'settings'          => '', // optional
    'conversation_id'   => 0,  // optional if you want to add messaging to your groups this can be useful
    ];
    $group = Groups::create($userId, $data);

    return view('/home');](url)

Laravel 9 ?

This package is not installable on Laravel 9.

Any chance to have a working version ?

Thanks, Denis

how to find a group?

What is the function to find a group like with model we use find() but what with the package?

Foreign Key problem with migrations

When running php artisan migrate:

[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table group_request add constraint group_request_group_id_foreign foreign key (group_id) refe
rences groups (id) on delete cascade)

Error when creating group

I have tried to use this package and did the following steps:

  1. Created a controller to center the actions related to the groups
  2. Include the use clause (use Musonza\Groups\Groups;)
  3. Created a metho to call the group creation ($group = Groups::create($userId, $data);)

Then I got the error bellow:

Non-static method Musonza\Groups\Groups::create() should not be called statically, assuming $this from incompatible context

Is there any problem in my code?

I tried to instance a group object before calling the create method tool, but the constructor of Group object need a Comment object to be instanced. So I decided to ask here before trying something more!

Thank for developing a so useful tool, I hope I get using it!

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.