Skip to content

Instantly share code, notes, and snippets.

@sanikkenway
Created June 25, 2021 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanikkenway/a577d8ad3bc9d18d87273f8f8f1ae16a to your computer and use it in GitHub Desktop.
Save sanikkenway/a577d8ad3bc9d18d87273f8f8f1ae16a to your computer and use it in GitHub Desktop.
$models = \Model::withTrashed()->get();
foreach ($models as $model) {
if (\Str::contains($model->name, ' ')) {
echo $model->id.',';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment