belongsToMany Not In

belongsToMany Not In

>>> $notIn = $allSites->diff($c->sites);
=> Illuminate\Database\Eloquent\Collection {#821
     all: [
       AppSites {#833
         id: 2,
         site_name: "Bar",
         url: "http://bar",
         created_at: "2018-02-14 09:53:39",
         updated_at: "2018-02-14 09:53:39",
       },
     ],
   }
Comments are closed.