1 year ago

Eloquent returning empty collection

Posted 1 year ago by geetpurwar


My Subscriber Model is returning empty collection.

Here's the Model. And Model class is custom here. Any suggestions whats wrong in here.


namespace App;
use Illuminate\Database\Eloquent\SoftDeletes;

class Subscriber extends Model
    /* Soft-Deletes */
    use SoftDeletes;
    protected $dates = ['deleted_at'];

    /* Relationship */
    public function website()
        return $this->belongsTo(Website::class);

    public function create(Request $request)
        return $this->request;

Model Class:


namespace App;

use Illuminate\Database\Eloquent\Model as Eloquent;
use Spatie\Geocoder\Geocoder;

class Model extends Eloquent
    protected $fillable = [

Please sign in or create an account to participate in this conversation.