PHP code example of petehouston / laravel-tinymce-simple-imageupload

1. Go to this page and download the library: Download petehouston/laravel-tinymce-simple-imageupload 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/ */

    

petehouston / laravel-tinymce-simple-imageupload example snippets


    tinymce.init({
        // .. your config here
        relative_urls: false,
        file_browser_callback: function(field_name, url, type, win) {
            // trigger file upload form
            if (type == 'image') $('#formUpload input').click();
        }
    });

$ php artisan vendor:publish --provider=Petehouston\Tinymce\TinymceServiceProvider

Route::get('/tinymce_example', function () {
    return view('mceImageUpload::example');
});

$filename = 'image_'.time().'_'.$image->hashName();