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 6 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 6 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 6 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

manuelrodriguezrodriguez27 replied 6 years ago

That’s not what I’m referring to. How can I create the page? So in the menu I add for example an element called “Graphs”, I want to know how to create content in that page with graphs for example.

laraship Staff replied 6 years ago

You can create the page in the CMS section, is there any missing here ?

manuelrodriguezrodriguez27 replied 6 years ago

See this image: https://fotos.subefotos.com/0fda915221a8469a3be572984a891eb4o.png

I can’t put PHP content, so now I’ve got the page (thanks!) but I can’t put PHP and I need it. How can I do it, thanks again