I’m hoping to design a simple plugin based on pico CMS and call it in a protected function in my main class, called App. Plugin is called AppHelper. Attempt I added a required_once on the top of App class: and tested using this (which first AppHelper::isMobile is not right): in a protected method: and w…
Tag: php
Adding a plugin to a simple app using PHP/Symfony/Twig
I’m working on a proof-of-concept app based on pico CMS, and I’m hoping to create a simple plugin to add some basic methods to it. You can view plugin files in this link and app files in this link. How do I add this plugin and call isMobile();, for example? AppHelper plugin Answer Do not use stati…
Laravel old method not returning password values
I’m currently learning Laravel and I’m creating a register form. When the form has errors I want to repopulate the input fields with their old values. My form looks like this: For readibility I removed all labels, classes and ids from the input files. It looks like Laravel doesn’t ‘wan…
Display last WooCommerce admin order note in customers order history
I am looking to display the last Order Note, currently only viewable via Admin in Woocommerce, on the customer side in their Order History. So they can view the tracking number we add in after the …
How to retrieve an attribute from a namespaced element
I am trying to get the url attributes from the <media:content> elements in this RSS feed: Here’s what I have so far: This code works for all elements except the ones with a semicolon in the name, like <media:content> or <dc:contributor>. If I open the XML feed in my browser I can see t…
WordPress custom endpoint – rest_invalid_handler
I am completely new with PHP and WordPress, however I start to write my first plugin that should be able to expose a custom endpoint. I managed to register and activate the plugin and the route, but when I am trying to access this endpoint I am getting the following error: If I access the: http://localhost/my…
Share files between users [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last month. Improve this question I have created an application which is based on PHP MySQL and I’m usi…
How to create dynamic sitemap in Codeigniter
How to create a dynamic sitemap in Codeigniter. I have created a php file in Controller named it Sitemap.php and created a view named it sitemap.php everything is going well but showing the following result not the actual XML file as shown in below image. Codeigniter Sitemap.php file View -> sitemap.php fi…
Illuminate Broadcasting BroadcastException No message
I’m using Laravel websocket written by beyoundcode. After couple of days, I’ve connected to myDomain.com/laravel-websockets and first step solved. But now, when I trigger an event, laravel has error at this point: this is my stacktrace screenshot: I read these questions and issues but nothing work…
Pulling all categories and grouping them by parent id
I am working with Laravel data querying and I need a query that is going to group all the children of a parent when I take the categories. the categories table has a name and a parent_id, the routes of the categories have the parent_id set as null, the query should return every category grouped by parent id a…