DivineOmega / uxdm

🔀 UXDM helps developers migrate data from one system or format to another.
GNU Lesser General Public License v3.0
167 stars 9 forks source link

Eloquent Source - pass in callback function #6

Closed DivineOmega closed 6 years ago

DivineOmega commented 6 years ago

You should be able to pass in a callback function with a $query parameter to allow the source records to be restricted. This would let you do the following.

$eloquentSource = new EloquentSource(\App\User::class, function($query) {
    $query->where('id', 1);
});