I have a question about force using HTTPS in laravel, i’ve added a condition inside AppServiceProvider.php, creating a middleware and modifying the .htaccess file. But I can still access the http page. Is there any other way to get laravel to redirect to https instead of http, and how to prevent user to…
Tag: php
Laravel storage link keep redirected to /public directory in hosting
I’m using a hosting service to upload my laravel project and link it to laravel’s public directory using php header location in laravel’s root directory. Then I created a storage link in public directory using symlink or artisan command, but when I’m trying to access the files it alway…
Passing a list of menu items to the sidebar in Backpack Laravel
I’m trying to send a list to sidebar_content.blade.php. The idea would be getting the menu items from a database. I guess I should add the variable to the @include in every subview in the “chain”, but I don’t know which controller (if any) starts that chain. I have read the docs and tr…
PDOStatement::execute Values doesn’t work with WHERE Condition & HAVING Condition
i have a erreur PDOStatement::execute Values with WHERE Condition & HAVING Condition in same requette how i can make execute preparing value in both of theme WHERE, HAVING Erreur : Invalid parameter number: number of bound variables does not match number of tokens Answer you first have a problem in your m…
PHP Regex the nested section based on defined parent
I am trying to match a nested content section of the config based on the alias. I have the base prototype working for matching single aliases over here: https://regex101.com/r/1vwKsx/1 (section correctly matched to: ‘template_path_stack’ =>) HOWEVER, I want to select a section (which is re-used…
Laravel php artisan serve not doing anything and project not being created properly (windows 10)
I am trying to use Laravel for the first time. I am trying to install it precisely as the guide says with composer but when I create a new project I get the following error: Problem 1 – laravel/framework[v8.65.0, …, 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0…
php loop and tag to go to another page [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 months ago. Improve this question Hi I…
How to remove .php and replace ? with / in htaccess
How do I remove .php and replace ? with / at the same time. I have I want it to be called from the browser like this: In replacing ? data, I want it to be compatible with dir. Like in dir, I have: So, if the user calls http://localhost/testingproject/user, alone, there is no need to parse ? to /
AWS does not load PHP webpage wherever I try to connect to database
I’m new to AWS and I’ve tried deploying my web application but keep getting 504 Gate-way Timeout. However, after a bit of debugging and redeploying, I noticed that this was being caused by the PHP segment of my index.php file: In particular when I removed everything before the session_start(); lin…
Creating central config file with hundreds of defined names
I want to create a central config file, with a few hundred of defined setup configure names, that would be included with something like: I want to write the php code in the config file as follows: So when the above function is included with include file.php, I want function to all respond as if its the same a…