Comments (2)
Hey, are you eliminating id's from your user's table entirely? Why do you wan't to use UUID instead? Just trying to understand the use case and benefit of it here?
from laravel-friendships.
Morph method is simply shortcut for {name}_id
and {name}_type
. But for id
it takes bigInteger
. We need uuid
field type.
Schema::create(config('friendships.tables.fr_pivot'), function (Blueprint $table) {
$table->increments('id');
$table->string('sender_type');
$table->uuid('sender_id');
$table->string('recipient_type');
$table->uuid('recipient_id');
$table->tinyInteger('status')->default(0);
$table->timestamps();
});
and
Schema::create(config('friendships.tables.fr_groups_pivot'), function (Blueprint $table) {
$table->integer('friendship_id')->unsigned();
$table->string('friend_type');
$table->uuid('friend_id');
$table->integer('group_id')->unsigned();
$table->foreign('friendship_id')
->references('id')
->on(config('friendships.tables.fr_pivot'))
->onDelete('cascade');
$table->unique(['friendship_id', 'friend_id', 'friend_type', 'group_id'], 'unique');
});
from laravel-friendships.
Related Issues (20)
- getAcceptedFriends not returning the user details HOT 7
- can't send friend request HOT 2
- Call to undefined method App\User::getPendingsCount() HOT 2
- PHP 7.2 count() Issue HOT 2
- Friendship Status HOT 2
- "Incorrect table name" after publishing the vendor HOT 2
- Does not work with Laravel 5.8 (Event::fire) HOT 12
- laravel issue when I add notes to database HOT 3
- laravel-friendships needs a maintainer HOT 10
- How To Fetch Posts For only friends HOT 2
- Will this work HOT 3
- How do you check relationship with other user before sending a friend request? HOT 1
- Support for Laravel 6
- Laravel 7 support HOT 7
- Is this still maintained? HOT 3
- Replace usage of deprecated Illuminate\Events\Dispatcher::fire() HOT 4
- Composer install hootlex requires version ~5.* HOT 13
- Why getFriends method returns all friends ? HOT 4
- Method Illuminate\Events\Dispatcher::fire does not exist HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-friendships.