My image’s path is public/uploads/users/image.png then using src like this: But for every user the image has to be changed. I pass the …
Tag: php
How to create html file from path entered into url
How do websites like lichess and shrib create specific pages for you to personally use? Examples: http://en.lichess.org/fdnenTEJ -> https://lichess.org/fdnenTEJ http://shrib.com/uaR3EKNBc8d4OdI -> …
Laravel Eloquent where field is X or null
I have a table like this: Now I want to get all entries where field1 is 1, field2 is null and where datefield is smaller than X or null. I already tried something like this: but thats not working. I always get every entry where datefield is null. It doesn’t matter what the other fields are. I also tried…
Autocomplete working on localhost, but not on server
I have a search formula with an autocomplete function which works just fine on localhost, but as soon as I put it on a remote server it stops working. I hope you can help me. Here is some Code: index.php: ajax.php auto.js Answer You are missing the php in the HTML and if your server isn’t set up for sho…
wp_nav_menu filter, removing a specific link
I’m trying to remove a specific link from my wordpress menu: <li class="ubermenu-item ubermenu-item-type-post_type ubermenu-item-object-page ubermenu-item-1 ubermenu-item-level-0 ubermenu-column …
Binding String using MATCH AGAINST in query
Binding to prepare statement using mysqli is working fine when I’m using query like this but it’s nott working when I’m using this query What is the right way of using MATCH() AGAINST() with a question mark in query for binding value. Answer New full code based on pastebin: The problem was f…
Publishing config and migrations from included package in Laravel
I’m using Laravel to build a package which will include some Admin functionality and will include some other packages. I have included a package which has migrations and a config file, But how do I copy those to the correct folder in Laravel. The package has it’s own ServiceProvider but How do I c…
Pass javascript variable to twig
I just want to pass a javascript variable to a twig path. Now i’m using this, but it doesn’t work. Answer Note You should really look at the FOSJsRoutingBundle.
Search for country
I have built a web application where you can search for a set of locations. Its a free text field where the visitor can input name, street, city, country, etc. I’m using php and Elasticsearch. The …
Required_if laravel with multiple value
I have a dropdown menu like this: Option 1Option 2…