Fenos\Notifynder\Models\Notification::from PHP Method

from() public method

public from ( ) : BelongsTo | Illuminate\Database\Eloquent\Relations\MorphTo
return Illuminate\Database\Eloquent\Relations\BelongsTo | Illuminate\Database\Eloquent\Relations\MorphTo
    public function from()
    {
        // check if on the configurations file there is the option
        // polymorphic set to true, if so Notifynder will work
        // polymorphic.
        if (config('notifynder.polymorphic') == false) {
            return $this->belongsTo(config('notifynder.model'), 'from_id');
        }
        return $this->morphTo();
    }