Answers for "laravel check if table is empty"

PHP
2

laravel check if laravel query is empty

if ($result->first()) { } 
if (!$result->isEmpty()) { }
if ($result->count()) { }
if (count($result)) { }
Posted by: Guest on May-18-2020
0

empty table in laravel

MyModel::truncate();
Posted by: Guest on June-19-2020
0

empty table in laravel

\App\Model::query()->delete();
Posted by: Guest on June-19-2020

Code answers related to "laravel check if table is empty"

Browse Popular Code Answers by Language