PHP code example of chudoyoudo / laravel-admin-tinymce
1. Go to this page and download the library: Download chudoyoudo/laravel-admin-tinymce 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/ */
chudoyoudo / laravel-admin-tinymce example snippets
php artisan vendor:publish --tag=asm-laravel-admin-tmeditor
namespace App\Admin\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class FileUploadController
{
public function upload(Request $request)
{
if($request->file('file')){
$path_toFile = Storage::putFile('editor_upload', $request->file('file'));
return json_encode(['location'=>Storage::url($path_toFile)]);
}
}
}