Posts by Ivan Moreira • 301 points
16 posts
-
0
votes1
answer285
viewsA: Recover response from a post using guzzle
I got it. I just had to modify the $response for : $response->getBody()->getContents().
-
1
votes1
answer285
viewsQ: Recover response from a post using guzzle
I’m trying to catch the answer of a porst json with the guzzle in a simple php. This is the function in a Laravel project that posts to a url. (I’m using var_dump to show the result in the…
-
0
votes2
answers1471
viewsQ: Transform object array into only one array
I have a array multiples objects: array(3) { [0]=> object(stdClass)#5750 (2) { ["value"]=> string(16) "[email protected]" ["key"]=> string(18) "email_client" } [1]=> object(stdClass)#5254…
-
2
votes2
answers343
viewsA: Error installing JWT/Laravel
I managed to solve the problem using composer require tymon/jwt-auth:1.0.0-alpha.3
-
2
votes2
answers343
viewsQ: Error installing JWT/Laravel
I’m trying to install the JWTAuth in my project. I updated my composer.json as documented: Composer.json: "require": { "tymon/jwt-auth": "0.5.*" } I ran the Composer update command and presented the…
-
1
votes4
answers381
viewsQ: Transform Multiple arrays into an array only
In certain process of my system, I receive as return of a function a array of characteristics and that array may contain various information, including other information arrays with different names…
-
1
votes1
answer222
viewsQ: Multiple Keys/values in a javascript array
in certain part of my code I need to make a request using javascript with several equal ids. The problem is that it is overwriting the ids with the last selected. My Html: <button class="btn…
-
4
votes1
answer1650
viewsQ: Search for relationship whereHas Laravel?
I have a Query in my Criteria that returns the id belonging to the relationship amid models if ($this->request->has('notin_portal')) { $portal = $this->request->get('notin_portal'); if…
-
0
votes1
answer82
viewsA: Append to a specific line in a text file
I managed to solve. php opens the files that are outside the root of Laravel, the only thing I needed to do was pass the complete path of the file. In a function created in another class, it looks…
-
0
votes1
answer82
viewsQ: Append to a specific line in a text file
Good morning, I have a function that makes an append in certain line of my xml file. function addInFile($file, $lineNumber, $content) { $fileTemp = "$file.bak"; $currentLine = 0; $fpRead =…
-
1
votes1
answer223
viewsQ: How to select a larger number of records based on another SQL table
I have an IMMOBILE table ID | Tipo | endereço 1 | Casa | Rua teste 2 | Casa | Rua teste 3 | Apartamento | Rua teste And a sales chart id | ID_do imovel 1 | 1 2 | 2 I need to know based on the sales…
-
0
votes1
answer54
viewsQ: Add values in an array with javascript for update
I need to do a user editing in PHP + javascript, but as I am layman in javascript I do not know how to build the function javascipt since I can have different values within the form. My form was…
-
1
votes1
answer1643
viewsQ: Update several records at once
Hello, I have a table with the following fields:KEY, VALUE , ALIAS, CLIENT_ID. In a certain system process I need to update Key and Value. To update a record I have no problems, the problem is that…
-
3
votes2
answers1944
viewsQ: Remove comma from the last foreach value in PHP
Good morning, I have a foreach in my system and I need to separate the items pro comma, then the foreach is like this foreach($value as $item){ echo $item . ','} the result obviously comes out:…
-
2
votes2
answers1154
viewsQ: Add Information to a file on a specific line
I’m using the file_put_contents to create a file, but in a certain part of my process I need to add things to that file but only from line 2, I searched in the PHP documentation of file_put_contents…
-
0
votes1
answer80
viewsQ: PHP Fatal error: bytes exhausted After running query
Hello, in a certain process of my code I need to execute a query that returns me 4500 rows from the database return Property::whereHas('portals', function ($query) { $query->where('portal_id',…