Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.35 KB

File metadata and controls

39 lines (26 loc) · 1.35 KB

PHP Console for Chrome DevTools

A simple Chrome extension to iframe a PHP console. This package utilizes Spaties Laravel Web Tinker package, and iframes it in the devtools panel, making it accessible from anywhere in the panel.

Installation

  1. Download and unzip this project.
  2. Navigate to chrome://extensions/ in your browser.
  3. Enable "Developer mode" in the top right corner (if not already enabled).
  4. Click "Load unpacked" and select the php-ext folder.

Laravel Package Installation

In your Laravel project:

  1. Install the Spatie Laravel Web Tinker package:

    composer require spatie/laravel-web-tinker
  2. Publish the Web Tinker assets:

    php artisan vendor:publish --provider="Spatie\WebTinker\WebTinkerServiceProvider" --tag="web-tinker-assets"
  3. Compile the assets (if using Laravel Mix):

    npm install && npm run dev

Troubleshooting

If you encounter an error like Mix manifest not found at: /path/to/public/vendor/web-tinker/mix-manifest.json, make sure you've completed steps 2 and 3 of the Laravel package installation.

Run Tinker in DevTools

Now, you'll see a PHP tab in the console. Click on this to open PHP console and run your Laravel/PHP code.

PHP Extension screenshot