php Questions
7
Solved
We have a PHP app that forwards messages from RabbitMQ to connected devices down a WebSocket connection (PHP AMQP pecl extension v1.7.1 & RabbitMQ 3.6.6).
Messages are consumed from an array o...
6
Solved
In this code the table is created in the up method and deleted in the down() method. When I run the migration, the table is created but not deleted. In what way can I trigger the down method, so th...
Manama asked 1/3, 2018 at 18:40
2
Solved
I'm defining a class as follow, using the suggestion from https://blog.jetbrains.com/phpstorm/2020/10/phpstorm-2020-3-eap-4/#arrayshape to define the array shape as a constant so that it can be use...
12
I am using the following JavaScript to convert all the English numbers showing on my website to Persian.
I realize that there are several ways to go about this and I have looked online and tried a...
Seattle asked 28/7, 2016 at 4:18
5
Solved
I have a complex Artisan Command that I wanna call in my Controller also. That works. Except that it return an Exitcode instead of output.
use Symfony\Component\Console\Output\BufferedOutput; # on...
4
Solved
I want to downgrade the version of php from 7.3.4 to 7.0.0 in my laravel project. Please suggest how to do it?
I am using artisan serve.
I am using laravel version 5.4.36
11
Solved
I am trying to use a PHP connection to connect MySQL Database which is on phpmyadmin. Nothing fancy about the connection just trying to see whether the connection is successful or not. I am using M...
4
Solved
I'm using Guzzle in a set of PHPUnit-powered tests for a REST API.
I create my client as follows:
use GuzzleHttp\Client;
$client = new Client(['base_url' => ['http://api.localhost/api/{versio...
6
Solved
I have a number of strings which contain words which are bunched together and I need to seperate them up.
For example
ThisWasCool - This Was Cool
MyHomeIsHere - My Home Is Here
Im slowly getting ...
7
Solved
In RegEx, I want to find the tag and everything between two XML tags, like the following:
<primaryAddress>
<addressLine>280 Flinders Mall</addressLine>
<geoCodeGranularity&g...
3
Solved
According to the Laravel documentation Request is acquired via dependency injection. For a controller this is fine, but how do we access Request object outside a controller, for example in a view
6
Solved
I get from here : https://github.com/barryvdh/laravel-dompdf
My controller is like this :
public function listdata()
{
$pdf=PDF::loadView('print_tests.test_pdf');
$pdf->setPaper('L', 'landsc...
Crumpler asked 21/12, 2016 at 22:15
7
Whenever I execute vendor/bin/phpunit in root path of my laravel project, it gives back a Permission denied error. How can I fix this problem?
Important: I don't want to use composer update or del...
5
Solved
I want to run a .php file in windows cmd.
I followed this (suggestion)
php is not recognized as an internal command (in Windows)
But it did not work.
I tried this command prompt: C:\Windows\syst...
5
Solved
I have the following regex:
\[([^ -\]]+)( - ([^ -\]]+))+\]
This match the following successfully:
[abc - def - ghi - jkl]
BUT the match is:
Array
(
[0] => [abc - def - ghi - jkl]
[1] => a...
Bellerophon asked 12/4, 2011 at 23:35
2
Solved
I'm trying to connect to another machine using PHP's ssh2 functions. I know the ssh keys have been created with no passwords and are distributed correctly, I can ssh user@host in the terminal on my...
Matias asked 27/5, 2014 at 2:10
5
Solved
I have a problem, new routes in laravel are not working, url shows the correct route but almost as if it does not get to my routes web file just returns page not found every time.
I have tried:
us...
6
Solved
I would like to manually send a password reset request to a specific user (not the one currently logged in) from within a controller. I did some digging around in the Laravel code and it seems like...
2
Solved
I'm starting to read about Carbon and can't seem to figure out how to create a carbon date.
In the docs is says you can;
Carbon::createFromDate($year, $month, $day, $tz);
Carbon::createFromTim...
Cyrus asked 24/1, 2016 at 1:12
5
Solved
I need to use the "Maintenance mode" using the artisan command php artisan down, but just for some specific urls...
In my case, I want that all urls that starts with /admin continue worki...
5
Solved
I'm experimenting with Deployer to deploy Laravel application into shared hosting (using laravel recipe) from my local ~/Code/project_foo.
The point is that when I'm connected to my shared hosting...
Chanellechaney asked 1/3, 2018 at 12:15
3
Solved
I'm using this code {$entry.entry|strip_tags} to strip tags, however I would just like to strip <p> tags and not all HTML tags.
Can someone help?
Thank you
Hedley asked 6/3, 2012 at 16:47
2
Solved
I have two arrays like this:
$arr1 = ['/^under.*/', '/^develop.*/', '/^repons*/'];
$arr2 = ['understand', 'underconstruction', 'developer', 'develope', 'hide', 'here', 'some'];
I want to match the...
18
Solved
I am trying to run PHP via FastCGI on a Windows 2008 server.
I followed this installation doc http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis7/ and have checked I...
Notum asked 11/4, 2014 at 8:38
23
Solved
I've been using this exact same code for ages, and I have never had a single problem. Now all of a sudden it has stopped working.
I have read across the internet about this problem, and apparently...
Capitalist asked 31/5, 2015 at 5:28
© 2022 - 2024 — McMap. All rights reserved.