loop ober object laravel code example Example: loop object property laravel foreach( $project->toArray() as $key => $value ) { echo $key; }