I am trying to create a Custom Access Decision Manager by implementing AccessDecisionManagerInterface on Symfony 5.2. Symfony recognizes the decision manager and instantiate it, but it doesn’t pass Voters array to decision manager. So it can’t collect votes, however the default decision manager wo…
Tag: php
Why is my ftp connection not working in php laravel but is working in FileZilla?
I have a PHP Laravel (5.6) system that I need to connect to an FTP server to upload a single file. The FTP server that I am connecting to is restricting access by ip address, uses port 990, and other than that has a seemingly simple configuration. On my local machine (I’m running on Linux Ubuntu if that…
Is it possible to use a passed parameter several times in Laravel?
I am new to Laravel and I’m developing an application. I’m trying to fetch the data from a database, which works fine, and print them on a screen using a passed parameter to blade, this also works fine. However, when I want to use the same passed parameter for several times, I get the following er…
Array sort by key where keys are clothes sizes (S, M, L, etc.)
I have an array where it’s keys are the sizes and values are either ‘in-stock’ or ‘no-stock’. Example array: I’m trying to sort this by size. Expected output is: I’ve been looking at other similar questions but with no success because those had different array structu…
write in database (php/mySQL)
The problem is very simple (and everything, php and html is on one file(.php)) html part: the result is die(‘formulaire incomplet’);,and nothing is written in the database, i don’t see why. Any clue is welcome! thanks by advance Answer First, use the bound parameters method for all your data…
Always get related model of relationship model in Laravel Eloquent
I have three Eloquent Models: Company, OrdersArea and Localization where a company has many orders areas and orders area always have one localization. I need to getting the Orders Area model to always load with Localization If I do that: I gets Company of logged user without OrdersArea and it’s ok. and …
Script not running and I can’t find out why
I’m new to PHP and HTML, and I’m building a small CMS with those 2 languages. Not sure what I’m missing here, I’m sure it’s beginner level, but for no reason, the script below stopped working, meaning the site won’t load. Here’s the code: The connections.php file is j…
Guzzle query string prameters
I’m having problems writing my request. I need to provide query string parameters to GET method using request(). Since I’m writing tests I can’t edit the method. Right now I have it written like this: Method that gets paginator_data: And thats how query looks if I check the request testing i…
Yajra/Jquery datatable how to exclude records based on condition
How can I exclude data based on my condition on the addColumn function? What I tried is this but it will include records that are > 0 On the frontend side, I also tried Now it hides the data but the pagination is showing for all the data. As you can see in the image below. I got 3 records
STR_REPLACE to add prefix to mysql query in php
This is my query This is the function to add prefix to tables (This function is taken from MySqliDB class) When I echo rawAddPrefix($q,”demo_”) I get only prefix added to tbl_accounts table only. I need to add prefix to all tables. What’s wrong here ? Answer That function above does only poi…