Search code examples
laraveltinymceelfinder

How to disable elfinder delete and edit option?


Hello I am using elfinder in my laravel application. I am not able to disable delete option from elfinder. Any help is hugely appreciated.

Here is my config file:

<?php

return array(

    'dir' => ['assets/uploads/news_upload'],

    'disks' => [

    ],

    'route' => [
        'prefix' => 'elfinder',
        'middleware' => array('web', 'auth'), //Set to null to disable middleware filter
    ],

    'access' => 'Barryvdh\Elfinder\Elfinder::checkAccess',

    'roots' => null,

    'options' => array(),

    'root_options' => array(

    ),

);
?>

I am not able to disable delete option.


Solution

  • I got the solution after 3 hour of research. And yes it is so simple, just put this code in your config file. Hope this answer will help somebody some day.

    'root_options' => array(
        'defaults'   => array('read' => true, 'write' => true,'locked'=>true),
    ),