Saturday, August 9, 2025Setup Laravel web tinker
Keven Client A. Cataluña @LinkedIn
Introduction

This guide outlines how to set up Laravel Web Tinker by installing the spatie/laravel-web-tinker package, publishing its configuration and view files, and verifying the setup by accessing the web-based Tinker environment.

Steps1. Install the spatie/laravel-web-tinker package as a development dependency
    composer require spatie/laravel-web-tinker --dev
  
2. Run the following command to publish the assets
    php artisan web-tinker:install
  
      Publishing Web Tinker Assets...
  Web tinker installed successfully.
  
3. To modify the default settings, publish the configuration file
    php artisan vendor:publish --provider="SpatieWebTinkerWebTinkerServiceProvider" --tag="config"
  
       INFO  Publishing [config] assets.

  Copying file [vendor/spatie/laravel-web-tinker/config/web-tinker.php] to [config/web-tinker.php] ........................ DONE
  
4. To modify the default Tinker interface, publish the view file
    php artisan vendor:publish --provider="SpatieWebTinkerWebTinkerServiceProvider" --tag="views"
  
       INFO  Publishing [views] assets.

  Copying directory [vendor/spatie/laravel-web-tinker/resources/views] to [resources/views/vendor/web-tinker] ............. DONE
  
5. Navigate to https://laravel.get-go.dev/tinker and you should see the Tinker page