Skip to content

Instantly share code, notes, and snippets.

@thetwopct
Created November 3, 2021 05:54
Show Gist options
  • Save thetwopct/723b4a057a2101d6b0be9731b8ec7c5c to your computer and use it in GitHub Desktop.
Save thetwopct/723b4a057a2101d6b0be9731b8ec7c5c to your computer and use it in GitHub Desktop.
Log variables/arrays in Laravel
<?php
use Illuminate\Support\Facades\Log;
class Component extends Model {
Log::info(print_r($variable, true));
}
@thetwopct
Copy link
Author

Or one-liner \Illuminate\Support\Facades\Log::info(print_r($variable, true));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment