PHP code example of luminarix / laravel-web-tinker

1. Go to this page and download the library: Download luminarix/laravel-web-tinker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

luminarix / laravel-web-tinker example snippets


public function boot()
{
    $this->registerPolicies();

    Gate::define('viewWebTinker', function ($user = null) {
        // return true if access to web tinker is allowed
    });
}

namespace Luminarix\LaravelWebTinker\OutputModifiers;

interface OutputModifier
{
    public function modify(string $output = ''): string;
}
bash
php artisan vendor:publish --tag="laravel-web-tinker-assets"
bash
php artisan vendor:publish --tag="laravel-web-tinker-config"
bash
php artisan vendor:publish --tag="laravel-web-tinker-views"
bash
php artisan laravel-web-tinker:install