Coder Social home page Coder Social logo

larainvite's People

Contributors

bmichotte avatar chellem avatar dariusiii avatar eazyserver avatar frederictribu avatar jimhill avatar junaidnasir avatar lamberski avatar laravel-shift avatar mgjgid avatar sgotre avatar uniconstructor avatar valeryan 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

larainvite's Issues

Laravel 6.0 support

I , and probably other users too, would like to have Laravel 6.0 supported by this package.

Maintainer proposal

Hello,

I have no idea how to contact you directly, so I create this issue because I'm willing to be the new maintainer of this project.

I'm using it and currently working on a fork to meet our needs.

What would be the conditions to be the new maintainer ?

Regards,
Fred

Support Multiple providers

Hello and +1 for this package. However I don't see how one can use this with multiple providers as in the system I am working with. Each of these providers can invite other users. I was thinking making the user_id and user_type as a morph() will make it more suitable for flexible cases. Let me know what you think

Can be configure name of attribute insead of user_id

First of all, it's a great library.

I would like to propose a way to change the name of the attribute user_id into user_invitations table.

For instance, I've been working with the following settings:

Account
user_id
company_id

User
id
name

Company
id
name

In my case, the responsibility for making invitations is Account Model, instead of Auth/User.

Ok, I 'll save the account_id into user_invitations table as the user_id attribute, but if I could configure the name of the attribute, could be easy to identify the relation.

You understand that I mean?

Can you add phonenumber

Hey this is great package. I need user phone number because i m building social app. Can u add this functionality?

Thanks:D

Laravel 10 Support

Now that Laravel 10 is out it would be great if this package could support it ๐Ÿ‘๐Ÿป

\Invite::isValid throws Exception

Hi, whe using is valid to validate a token, if the token is not in the DB it will throw a (PHP generic) exception, instead of returning false.

is this the intended behaviour?

Documentation in more detail.

I am new in Laravel. Can you please share some piece of application where you have used this package to full extent. Can you please explain the package's workflow and functionality a bit more. Can you please give a demo of how to make it work. @junaidnasir

Laravel 9 Support

Now that Laravel 9 is out it would be great if this package could support it ๐Ÿ‘๐Ÿป

Saving extra info with the invite

What steps are needed to save some extra piece of information with an invite? For example, my users can send an invitation to an email address, asking them to join one of their owned "rooms". Obviously I can't send room-id to invited guy in the url (people can change it). In fact, I shouldn't be sending the room id to the recipient in any form. It should just be saved with the invitation at sending time. I would then retrieve it when the invited guy comes in and sends me the refCode.

See what I mean?

Does not install on Laravel 11

Getting the following error when trying to install the package:

our requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires junaidnasir/larainvite ^6.0 -> satisfiable by junaidnasir/larainvite[v6.0.0].
    - junaidnasir/larainvite v6.0.0 requires illuminate/support ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0 -> found illuminate/support[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27
, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.3] but these were not loaded, likely because it conflicts with another require.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require junaidnasir/larainvite:*" to figure out if any version is installable, or "composer require junaidnasir/la
rainvite:^2.1" if you know which you need.

'status' column in user_invitations does not accept 'Null' value

Hi there, I came across this issue while fixing a project. The database I am using is on a sql server (so maybe why no other have this issue?). The only way I could get your package to work is if I added this line to the save function in LaraInvite.php $this->instance->status = "pending"; .

Not too sure if that is correct but it works. Hopefully, this will help anyone who has the same issue.

Best,

Vanida

Events in more detail?

Possible to get a bit more of an explanation of the events.

My eventsService Provider is

<?php
namespace App\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        'junaidnasir.larainvite.invited' => [
            'App\Listeners\userInvite',
        ],
    ];

    /**
     * Register any other events for your application.
     *
     * @param  \Illuminate\Contracts\Events\Dispatcher  $events
     * @return void
     */
    public function boot(DispatcherContract $events)
    {
        parent::boot($events);

        //
    }
}

and if i create 'App\Listeners\userInvite' with the provided code it gives

ReflectionException in Container.php line 738: Class App\Listeners\userInvite does not exist

tried to use php artisan event:generate but could not get it to generate anything.

Not used the event system before so not sure what i should be seeing.

Undefined property: Junaidnasir\Larainvite\Events\Invited::$email

Hello,

I have this error when i tried to send an invitation to my user.

When I upgraded to version 4.x, I had to change the event listener like that:

Before

// App\Providers\EventServiceProvider
protected $listen = [
        'junaidnasir.larainvite.invited' => [
            'App\Listeners\UserInvite',
        ],
];

After

// App\Providers\
protected $listen = [
        Invited::class => [
            'App\Listeners\UserInvite',
        ],
];

After that, I had the following error:
Undefined property: Junaidnasir\Larainvite\Events\Invited::$email

For now, I found this fix:

Before

// App\Listeners\UserInvite
public function handle($invitation)
{
        Mail::to($invitation->email)->send(new UserInviteMail($invitation->code, $invitation->email));
}

After

// App\Listeners\UserInvite
public function handle($invitation)
{
        Mail::to($invitation->invitation->email)->send(new UserInviteMail($invitation->invitation->code, $invitation->invitation->email));
}

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.