musonza / groups Goto Github PK
View Code? Open in Web Editor NEWA Laravel 5 user groups package
License: MIT License
A Laravel 5 user groups package
License: MIT License
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
Hi! Laravel 6 has been released. Can you update this package?
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)
I'd like to use this package to create groups of other models.. not users
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)
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;
}
What is the function to find a group like with model we use find() but what with the package?
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?
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table groups
add constraint groups_user_id_foreign
foreign key (user_id
) references users
(id
) on delete cascade).
I'm getting this issue while trying to migrating _create_groups_tables. Any help plz
I have tried to use this package and did the following steps:
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!
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
This package is not installable on Laravel 9.
Any chance to have a working version ?
Thanks, Denis
Any solution for that problem please?
Migrating: 2019_05_26_125854_create_groups_tables
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.