The page you're looking for doesn't exist.
\n2061\t Go Home\n2062\tSomething went wrong on our end.
\n2141\t Go Home\n2142\tThis example demonstrates how to integrate PostHog with a Laravel application.
\n2158\t\n2159\t \n2187\t\n2188\t\n2189\t Don't have an account? Sign up here\n2190\t
\n2191\t\n2192\t Tip: Default credentials are admin@example.com/admin\n2193\t
\n2194\tSign up to explore the PostHog Laravel integration example.
\n2218\t\n2219\t \n2248\t\n2249\t\n2250\t Already have an account? Login here\n2251\t
\n2252\tWhen you sign up, the following PostHog events are captured:
\n2257\tidentify() - Associates your email with the usercapture() - Sets person properties (email, etc.)user_signed_up event - Tracks the signup action// After creating the user\n2265\t$posthog->identify($user->email, $user->getPostHogProperties());\n2266\t$posthog->capture($user->email, 'user_signed_up', [\n2267\t 'signup_method' => 'form'\n2268\t]);\n2269\t
This page demonstrates custom event tracking with PostHog.
\n2283\t\n2284\tTimes you've considered a burrito
\n2286\t\n2287\t// Livewire component method\n2301\tpublic function considerBurrito(PostHogService $posthog)\n2302\t{\n2303\t $this->burritoCount++;\n2304\t session(['burrito_count' => $this->burritoCount]);\n2305\t\n2306\t $user = Auth::user();\n2307\t $posthog->identify($user->email, $user->getPostHogProperties());\n2308\t $posthog->capture($user->email, 'burrito_considered', [\n2309\t 'total_considerations' => $this->burritoCount,\n2310\t ]);\n2311\t}\n2312\t Welcome back, {{ auth()->user()->email }}!
\n2326\tTest manual exception capture in PostHog. These buttons trigger errors in the context of your logged-in user.
\n2331\t\n2332\t @if($successMessage)\n2333\ttry {\n2355\t // Critical operation that might fail\n2356\t processPayment();\n2357\t} catch (\\Throwable $e) {\n2358\t // Manually capture this specific exception\n2359\t $errorId = $posthog->captureException($e, $user->email);\n2360\t\n2361\t return response()->json([\n2362\t 'error' => 'Operation failed',\n2363\t 'error_id' => $errorId\n2364\t ], 500);\n2365\t}\n2366\t This demonstrates manual exception capture where you have control over whether errors are sent to PostHog.
\n2367\tYou're seeing this because the new-dashboard-feature flag is enabled for you.
Feature Configuration:
\n2379\t{{ json_encode($featureConfig, JSON_PRETTY_PRINT) }}\n2380\t @endif\n2381\t The new-dashboard-feature flag is not enabled for your account.
// Check if feature flag is enabled\n2388\t$showNewFeature = $posthog->isFeatureEnabled(\n2389\t 'new-dashboard-feature',\n2390\t $user->email,\n2391\t $user->getPostHogProperties()\n2392\t);\n2393\t\n2394\t// Get feature flag payload\n2395\t$featureConfig = $posthog->getFeatureFlagPayload(\n2396\t 'new-dashboard-feature',\n2397\t $user->email\n2398\t);\n2399\t
This page demonstrates error tracking with PostHog.
\n2414\t\n2415\t| {{ auth()->user()->email }} | \n2419\t|
| Date Joined | \n2422\t{{ auth()->user()->created_at->format('Y-m-d H:i') }} | \n2423\t
| Staff Status | \n2426\t{{ auth()->user()->is_staff ? 'Yes' : 'No' }} | \n2427\t
Test manual exception capture in PostHog. These buttons trigger errors in the context of your logged-in user.
\n2434\t\n2435\t @if($successMessage)\n2436\t\n2457\t This demonstrates manual exception capture where you have control over whether errors are sent to PostHog.\n2458\t
\n2459\ttry {\n2464\t throw new \\Exception('Test exception from critical operation');\n2465\t} catch (\\Throwable $e) {\n2466\t // Capture exception with user context\n2467\t $posthog->identify($user->email, $user->getPostHogProperties());\n2468\t $eventId = $posthog->captureException($e, $user->email);\n2469\t\n2470\t return response()->json([\n2471\t 'error' => 'Operation failed',\n2472\t 'error_id' => $eventId,\n2473\t 'message' => \"Error captured in PostHog. Reference ID: {$eventId}\"\n2474\t ], 500);\n2475\t}\n2476\t This example demonstrates how to integrate PostHog with a Laravel application.
\n\n \n\n\n Don't have an account? Sign up here\n
\n\n Tip: Default credentials are admin@example.com/admin\n
\nSign up to explore the PostHog Laravel integration example.
\n\n \n\n\n Already have an account? Login here\n
\nWhen you sign up, the following PostHog events are captured:
\nidentify() - Associates your email with the usercapture() - Sets person properties (email, etc.)user_signed_up event - Tracks the signup action// After creating the user\n$posthog->identify($user->email, $user->getPostHogProperties());\n$posthog->capture($user->email, 'user_signed_up', [\n 'signup_method' => 'form'\n]);\n
This page demonstrates custom event tracking with PostHog.
\n\nTimes you've considered a burrito
\n\n// Livewire component method\npublic function considerBurrito(PostHogService $posthog)\n{\n $this->burritoCount++;\n session(['burrito_count' => $this->burritoCount]);\n\n $user = Auth::user();\n $posthog->identify($user->email, $user->getPostHogProperties());\n $posthog->capture($user->email, 'burrito_considered', [\n 'total_considerations' => $this->burritoCount,\n ]);\n}\n Welcome back, {{ auth()->user()->email }}!
\nTest manual exception capture in PostHog. These buttons trigger errors in the context of your logged-in user.
\n\n @if($successMessage)\ntry {\n // Critical operation that might fail\n processPayment();\n} catch (\\Throwable $e) {\n // Manually capture this specific exception\n $errorId = $posthog->captureException($e, $user->email);\n\n return response()->json([\n 'error' => 'Operation failed',\n 'error_id' => $errorId\n ], 500);\n}\n This demonstrates manual exception capture where you have control over whether errors are sent to PostHog.
\nYou're seeing this because the new-dashboard-feature flag is enabled for you.
Feature Configuration:
\n{{ json_encode($featureConfig, JSON_PRETTY_PRINT) }}\n @endif\n The new-dashboard-feature flag is not enabled for your account.
// Check if feature flag is enabled\n$showNewFeature = $posthog->isFeatureEnabled(\n 'new-dashboard-feature',\n $user->email,\n $user->getPostHogProperties()\n);\n\n// Get feature flag payload\n$featureConfig = $posthog->getFeatureFlagPayload(\n 'new-dashboard-feature',\n $user->email\n);\n
This page demonstrates error tracking with PostHog.
\n\n| {{ auth()->user()->email }} | \n|
| Date Joined | \n{{ auth()->user()->created_at->format('Y-m-d H:i') }} | \n
| Staff Status | \n{{ auth()->user()->is_staff ? 'Yes' : 'No' }} | \n
Test manual exception capture in PostHog. These buttons trigger errors in the context of your logged-in user.
\n\n @if($successMessage)\n\n This demonstrates manual exception capture where you have control over whether errors are sent to PostHog.\n
\ntry {\n throw new \\Exception('Test exception from critical operation');\n} catch (\\Throwable $e) {\n // Capture exception with user context\n $posthog->identify($user->email, $user->getPostHogProperties());\n $eventId = $posthog->captureException($e, $user->email);\n\n return response()->json([\n 'error' => 'Operation failed',\n 'error_id' => $eventId,\n 'message' => \"Error captured in PostHog. Reference ID: {$eventId}\"\n ], 500);\n}\n