New menu element and add php code to the CMS editor

Laraship QuestionsCategory: TechnicalNew menu element and add php code to the CMS editor
manuelrodriguezrodriguez27 asked 5 years ago
Hello, so I've bought the Subscription Laraship script and I'd like to know how to create a new element in the Sidebar menu and how to implement custom PHP code there. Thanks! P.D: I'm a PHP developer but I'm new to Laravel
2 Answers
Best Answer
laraship Staff answered 5 years ago

Hello,

We have disabled adding php direct to the CMS for security reasons, however if you are still insist to use to add it you can comment this line at your own risk

        $content = str_ireplace(array('<?php', '@php', '<?', '@endphp', '?>'), array('&lt;?php', '&lt;?PHP', '&lt;?', '&gt;?php', '?&gt;'), $content);

at Corals/modules/CMS/Models/Content.php line #81

laraship Staff answered 5 years ago

Hello,

There is already Menu manager for Laraship, Under Administration -> Menu you can edit Sidebar, front end top and front end footer menus