Posts by Leandro Paiva • 592 points
36 posts
-
-2
votes1
answer876
viewsQ: Laravel Error 4.2 - SQLSTATE[HY000] [2054] Server charset Unknown to the client. Please, report to the Developers
I’m having problems in a web application using Laravel 4.2 the same worked in a Windows 7 environment with IIS + PHP 5.6 but I had to change the machine and create a new development environment.…
-
0
votes1
answer436
viewsA: Problem to set mask in an input field with Knockoutjs
I found the solution to the problem using jQuery together with Knockoutjs, below the lines changed in the source code. HTML: <div class="form-group col-sm-3"> <input name="cnpjCpf"…
-
1
votes1
answer436
viewsQ: Problem to set mask in an input field with Knockoutjs
I’m unable to apply a dynamic mask (CNPJ/CPF) to the input field of an application created in Laravel 4.2, using HTML5 and Knockoutjs. This is returning the following error message on the Chrome…
-
2
votes1
answer42
viewsA: Storing the value of a SELECT Query in a column in MYSQL
From what I understand you want a column called profit, present in your table receive the calculation you are doing in SELECT for the alias Profit. CONCAT('R$ ', ROUND(pacote.Quantidade *…
mysqlanswered Leandro Paiva 592 -
0
votes3
answers11983
viewsA: Access-Control-Allow-Origin error with Xmlhttprequest()
"With the implementation of CORS one domain allows communication with another free form, independent of the call method (GET, POST, PUT or DELETE) as long as the target domain has specified this…
-
2
votes2
answers382
viewsA: Run JS function when user choose Select
Use the parameter (HTML event) onChange to call the function. HTML code: <select id="frmOperadora0" name="frmOperadora" onChange="teste()"> <option value="0">-----</option>…
-
2
votes2
answers598
viewsA: Remove QUOTES when generating TXT file using PHP
To clear the values extracted from the foreach array try to replace the str_replace() for preg_replace() with the following regular expression: '/[^0-9]/' - Characters from 0 to 9 '/[^0-9 ]/' -…
-
1
votes1
answer169
viewsA: How to make multiple database connections with Laravel 4.2
The error message quoted is because I don’t have the Microsoft SQL Server driver installed and configured with my PHP. Download the driver pack separately on website of Microsoft according to the…
-
1
votes1
answer169
viewsQ: How to make multiple database connections with Laravel 4.2
I have an app written on Laravel Framework 4.2, rotating in the PHP 5.6, in the Operating System Windows 7, connected to a mysql database, there was the need to make additional connection in another…
-
0
votes2
answers1221
viewsA: How to format a txt file by inserting columns and changing date and time format with php script
Using as example the file data.txt with the following data: 0000000001 001 00000000000090000001 01/01/2014 00:00:38 1 0 5 0000000002 010 00000000000090000001 01/03/2015 00:00:38 1 0 5 0000000003 011…
-
3
votes2
answers694
viewsA: Pick up the return from one function to another in the Laravel controller
As you are referencing a function within the same class that was instantiated it is necessary to use $this in the call to the method, so your code of the function you receive has to stay this way:…
laravelanswered Leandro Paiva 592 -
2
votes1
answer20
viewsA: Laravel 4 application does not write to files
I figured out what was blocking write access in directories, it’s about Selinux, an implementation of the architecture MAC (Mandatory Access Control) for Linux that provides security policies on all…
-
0
votes1
answer20
viewsQ: Laravel 4 application does not write to files
I have an Apache server installed in the Centos 7 Operating System and an application built through the Laravel 4.2 Framework, I have already changed the permissions of the system directories with…
-
0
votes1
answer72
viewsA: npm enterprise proxy error does not leave low packets
With your company’s proxy settings in hand, just run the two commands below: npm config set proxy "<endereço e porta>" npm config set https-proxy "<endereço e porta>" Example 1: your…
npmanswered Leandro Paiva 592 -
3
votes2
answers531
viewsA: How to name folders in PHP’s MVC structure
MVC (Model-View-Controller) is a standard software architecture where it does not become mandatory to directly determine the name of directories and files, however you can follow the concept used by…
-
2
votes1
answer221
viewsA: Class does not exist CORS Standard
As you have created a new class, it may be that Laravel is not "seeing" this class, at the root of your project try to execute the following commands: Dump-autoload or php Artisan dump-autoload they…
-
0
votes1
answer521
viewsQ: Error using Javascript window.history.back()
Hello, I’m having trouble using the method window.history.back() in Javascript, the same has the functionality to return to the previous page of my application, the problem is that I have a POST…
-
3
votes3
answers451
viewsQ: Permissive issues when creating Linux server folders using mkdir
I have a PHP system using Laravel 4.2 where I use the mkdir command to create a folder in the Storage/pdf directory, the command works in the Windows Dev environment, but when climbing to the UOL…
-
5
votes1
answer2458
viewsQ: Resolve Problem with Docker for Windows
I am not able to start Docker on Windows, I already remade the installation process plus the error reported is the same. Since virtualization is active on my workstation. Follow the basic…
-
0
votes1
answer46
viewsA: Problem making a field search by date and id
The "Where" method appears to have been misspelled, so try: public function scopeSearchByKeyword($query, $keyword) { if ($keyword!='') { $query->where(function ($query) use ($keyword) {…
-
3
votes1
answer106
viewsA: Is it possible to activate the Operating System context menu in swing application?
What happens is that Operating Systems have native features for creating windows, menus, etc that are not portable between them, that is, if you create a window using a language in Windows using the…
-
1
votes1
answer1361
viewsQ: Remove input field options of type datetime-local
I have an input field type datetime-local and I need it to be as clean as possible, without cleaning buttons or step and just displaying the date and time in this format: '12/12/2016 12:01', I would…
-
0
votes1
answer1414
viewsQ: Problem to apply a jQuery mask to a modal
I have an HTML modal and in it there are two text fields that should receive dates, I am trying to apply a jQuery mask to these fields, but I was not successful, the mask usually applies when the…
-
2
votes1
answer475
viewsQ: Div breaking when label content is too big
To div one-page HTML this breaking when the text size of one of the labels I have inside it is very large, I am using the following code: <div class="divRelato" style="background-color: #eee">…
-
0
votes1
answer3263
viewsQ: How to change local URL on IIS
In the local environment of development I always used localhost to access the application, but would like to use friendlier Urls (for example: http://system analysis), I tried setting up on IIS, but…
-
1
votes1
answer306
viewsQ: Files in public folder using Laravel 4.2 are inaccessible
Hello, I have an application where some files are created in the folder public of Laravel 4.2, then send an email to the user with the URL’s to download these files, but there is an error when…
-
0
votes0
answers225
viewsQ: Sending email with Laravel 4.2 does not reach recipients
Hello, I am trying to send emails using the Laravel 4.2 but the messages only arrive when the recipient’s email is the same as the one sent. The file configuration mail.php was like this: <?php…
-
0
votes1
answer96
viewsQ: Chunk on Laravel 4.2 using lots of memory
I am using in an application a query to get data from a table and then generate a file xlsx. The problem is that it returns a lot of information, about 1,5 GB. As a solution, so I’m using the method…
-
0
votes0
answers123
viewsQ: Problems using Phpexcel cache system with Laravel 4.2
I’m trying to use the library’s cache system Phpexcel, but I am still getting memory overflow in my application. I need to use cache because I am generating reports with more than 100,000 records on…
-
1
votes1
answer155
viewsQ: Queries Builder Problems (Query Builder) in Laravel 4.2
Hello, I’m having trouble generating a querie using the Querie Builder of Laravel 4.2, the difficulty arises from the need that the resulting sentences for search in the database are within…
-
3
votes1
answer324
viewsA: Laravel 4.2 - Working with asynchronous tasks to generate reports . xlsx
I found a solution to meet my needs, a queue manager application called Beanstalkd, consuming this service is really easy in Laravel 4.2, as it has support to use it. Even more interesting is…
-
1
votes2
answers899
viewsA: Apache POI - Error opening file generated in MS Excel
The solution seems kind of silly, I continued to perform tests yesterday with the generation of spreadsheets and found that just instantiate Xssfworkbook does not generate a complete workbook, it is…
-
0
votes1
answer324
viewsQ: Laravel 4.2 - Working with asynchronous tasks to generate reports . xlsx
Hello, I am working with an application in Laravel 4.2 and need that, when the user makes the request to generate a system report, a task is launched to generate the report, when this report is…
-
1
votes2
answers899
viewsQ: Apache POI - Error opening file generated in MS Excel
Hello, I’m running some tests with Apache POI, version 3.15, for reporting purposes .xlsx, using the example code below, only to generate a file: package exemplousoapachepoi; import java.io.*;…
-
0
votes2
answers279
viewsQ: Memory error when generating spreadsheet with Phpexcel
I am having problems in generating Excel spreadsheets using Phpexcel when the number of records is too large the memory is insufficient to process the task, there is some way to improve the creation…
-
1
votes2
answers95
viewsQ: Turn a JSON string into a non-associative array in PHP
Good afternoon, would like to convert a string into a non-associative array in PHP, functions like json_encode/json_encode are not working properly. String: word =…