Posts by Bulfaitelo • 1,684 points
93 posts
-
1
votes1
answer606
viewsA: How to update an image to the database with Laravel?
According to what we talked on chat, the problem is related to form of editing which was missing the enctype="multipart/form-data", but when reading your code I realized that you can make some…
-
0
votes3
answers131
viewsQ: How to relate questions to a question
This question is not directly linked to code, but and the basic part of my project, I am currently divided into 2 options (which I will describe in detail below). Currently the UML is this way,…
-
2
votes1
answer240
viewsA: Random from 1 to 500 without repeating
You can add to this table the column TINY INT (1), of for example name usado and at search time do search limited to one with the condition used 0 , For example: SELECT column FROM table WHERE usado…
-
1
votes1
answer13026
viewsA: What solution to the error: "A non well Formed Numeric value encountered"?
The problem in your code is occurring due to variable $final1 is receiving a string as value, thus generating error at the time of calculation, it is receiving this value: 2.000.000.00 mais gastou…
-
2
votes1
answer330
viewsA: How to save bank data in the database?
Diego, Depending on the size of your online store I would not recommend you take responsibility for this data, in case of a possible external problem (hack, server security flaw and etc), I…
-
0
votes3
answers236
viewsA: Job scheduling and publishing
You will need to define a Schedule of Laravel, it is very simple to use and configure, just follow the documentation that will not have any problem. but I will leave an example for you: It stays…
-
1
votes1
answer126
viewsA: How to skip an entire row only if the field is empty in PHP?
I added the condition for it to add, the values in the variable $examesEquipamentos when, when the function valuestrlen($linha['ID']); is greater than 0, that is to say that there is some value, it…
-
1
votes1
answer189
viewsA: Unlink() error permission denied
For what we talked about in chat, it seems that your problem was related to directory permission. To solve this we set the directory with permission 777, running the command chmod 777 ../alunos…
phpanswered Bulfaitelo 1,684 -
0
votes1
answer44
viewsA: Sum Quantity and value by grouping by Product
Hello, to solve your problem just use the group by sql to group by material name, and then do the calculation you want, I tried to do all the summation inside and multiplication inside SQL. Below…
phpanswered Bulfaitelo 1,684 -
0
votes1
answer846
viewsQ: Take print screen when error occurs on Selenium Webdriver
I have a mini bot made in Python that does the scraping of data from Direct Treasure, in short it logs into my account, goes in the statement takes this data and returns a json, which within my…
-
0
votes1
answer609
viewsA: Convert SQL query to Query Builder (Orange)
I did the conversion, a tip is sometimes not to mount a query this way, because I took complex querys with more than 10 query lines that would become more than 30 and would be bad maintenance, but…
-
1
votes1
answer236
viewsA: Count returning null value with Query Builder Laravel
I believe your problem is in join where the right one would be to use leftJoin for holidays or absences, because case the innerjoin does not find anything it is a unique parameter, already the…
-
2
votes2
answers2119
viewsA: Display creation date (created_at) in Laravel 5.5 post
As we saw on Chat the problem is related to innerJoin who is subscribing to the information table news, $noticia = Post::where('slug', $slug) ->select('post.*')…
-
1
votes1
answer49
viewsA: How to duplicate a Csv field in PHP?
Using as a basis what we discussed, and your code already ready, which I did, I created a vector with the data from $perguntaId using the explode with the delimiter ";", I counted and if we have a…
-
4
votes2
answers120
viewsA: What is the difference between the preg_split and the explode?
The main difference between the explode(); and preg_split(); is that you can use regular expression in preg_split();, however, according to the stack with., the explosion is usually faster (follows…
phpanswered Bulfaitelo 1,684 -
3
votes3
answers85
viewsA: Are the variables of a function automatically deleted after its termination?
Variables within functions are automatically deleted at completion, in short it is only alive while the function is running. Reference:…
-
0
votes1
answer55
viewsA: Layout Laravel 5.6
I ran some tests here, I think your problem is in the Bootstrap in itself not in the Blades, has a .row between the charts and the table. exchange the reports.hora-a-hora.ativo.partials.charts and…
-
0
votes1
answer30
viewsA: How to count line with runquery(Laravel)
I’ll try to help you in the best way possible, you’re trying to use Laravel in a kind of "weird" way, so I’ll try to answer as many things as I see that I find wrong, all good ? First question: $id=…
-
0
votes3
answers40
viewsA: Printing only the last result
There was one detail missing from $html, now she concatenates $html and does not subscribe. with the use of the += will concatenate instead of subscribing. <?php $html = ""; foreach ($results as…
-
1
votes3
answers60
viewsA: how to return the current line using variable but return the line being used the PHP variable
The easiest way I found to solve sui problem is through the function debug_backtrace(); it returns various information, but for ease I created a function and every time I call it will return the…
-
0
votes1
answer47
viewsA: Changing pages according to the searched field
I added in the pagination the value of the search, so when paging it will not lose the search. I’ve put the case condition in place for $_POST[]; it saves the search variable if it does not check…
phpanswered Bulfaitelo 1,684 -
2
votes1
answer47
viewsA: UPDATE VIA CSV LARAVEL
I made the method to update the product name and the stock, based on the code already registered in the system. public function importUpdateEstoque(Request $request) { $validator =…
-
1
votes2
answers882
viewsA: Scheduling tasks in Laravel
What can you do, Create a Scheduler run every minute (or another longer interval), calling a method of SMSQueues (for example). This method would basically be a Select that would search based on the…
-
1
votes1
answer74
viewsA: Stock Control Grouping Products of the same type
Hello, come the solution we discussed in chat, we decided to change the structure of the project a little. Where we will add the field of sizes if related to the categories of products, so when…
-
3
votes2
answers218
viewsA: How to add only the highest values of a numerical sequence in Excel?
Your logic is almost right, only had a small error when implementing, see the example: =SOMASE(rage; ">1000") Example: =SOMASE(B51:B60; ">1000") Where range is where you want to add, and the…
excelanswered Bulfaitelo 1,684 -
0
votes1
answer38
viewsA: Repeat query there is database using for in PHP
I created a treatment to check if the $_POST[] received is an array or not, if it concatenates the ids and prepares for query, otherwise it simply inserts into query $count =…
-
1
votes1
answer125
viewsA: Show data array
In this example I’m creating a bi-dimensional vector, where the key is column and the value is an array of column values after I print everything. in the case and only one test, then just suit your…
-
1
votes1
answer81
viewsA: Search with multiple LIKE values with Laravel
The same way you do with where, only that using the orWhere this in a case of logical condition or, for example: $users = DB::table('users') ->where('name_1', 'like', '%thi%')…
-
1
votes2
answers27
viewsA: Keeping data in the fields after an action or updating on the page - PHP
I created the conditions so that when the variable $_POST['sistema']: exists and is equal to the Looping id or if it does not exist and the looping id is 12 to option stay as Selected but when there…
phpanswered Bulfaitelo 1,684 -
0
votes2
answers964
viewsA: How to send variables from one . PHP to another . PHP
I made a mini Example of how you can use the $_SESSION, divided into 3 parts, index, test, and Destroy, where index it will set the variables, test where you will view what was recorded in $_SESSION…
-
1
votes1
answer39
viewsA: Problems picking up the previous Insert id
The problem that the variable $last_id this out of the repeat loop, there are 2 ways to solve, you can put the second INSERT within the first loop of repetition or can create a vector of $last_id to…
-
2
votes1
answer55
viewsA: recover the record id in the table
Checking your code you are rewriting the id, what to take, but as it does not exist yet, the correct would be to enter in the bank to get the id of the last registration.…
phpanswered Bulfaitelo 1,684 -
1
votes2
answers72
viewsA: Doubt regarding the Task Schedule- Laravel events
It is based on crontab (for Linux) which runs every minute: * * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1 The ->hourly(); is executed every…
-
0
votes1
answer239
viewsA: How to display the name of the image that is in the bank in the view with Laravel?
You need to put a condition to check if any files have been uploaded. To do this just use the method hasFile(). In your case it would look something like this: public function update(Request…
-
0
votes0
answers452
viewsQ: Group by month or week with Laravel eloquent
I have a project that has managed my investments, that is, it takes my daily statement and saved in my project so that I can see how much it is yielding, in short I have a table that are daily these…
-
0
votes1
answer1152
viewsQ: Python webdriver Selenium does not find the item on the page after loading
I am having a problem when searching for an item inside a page, this item is loaded after loading the page via ajax or iframe, there is some way to create a condition for the script to wait until…
-
3
votes1
answer363
viewsQ: Script execution error in python in Laravel controller
Currently my scripts work perfectly within Schedule that run at specific times within my server cron. The problem is occurring when I try to run the method inside the controller, this method…
-
0
votes1
answer181
viewsQ: Problems accessing show method at the root of Laravel
I am studying Laravel and in parallel creating some projects, however I am struggling with some problems, when I am calling the method show(); Example the controller : Route::resource('/',…
-
0
votes1
answer102
viewsQ: What microframework should I use?
I am currently studying the Fat-Free Framework however I am struggling with many problems some functions simply do not work as they should, and others behave very differently from what is…
-
1
votes1
answer345
viewsQ: Use require or directly call the *.php file
Currently my project is following the following structure. // SESSAO if(($SisFuncoes->verificaPermissaoSecao($secao, 'home')) || $secao == null){ // requerindo a home do site.…
phpasked Bulfaitelo 1,684 -
1
votes1
answer674
viewsQ: Import Sql Server Backup and Differential
I’m having a problem importing a backup to the secondary server: The topology: Server Production >> Server contingency. When Full Backup is imported it matters without any problem. The problem…
-
1
votes2
answers2019
viewsA: Write to txt file with PHP
Kelvin could do the following, show how it is in txt and also how you want the result, so I can understand and help better. A while ago I made a post about UTF-8 fix which analyzes a file in…
-
1
votes3
answers658
viewsA: Pass SQL output to JSON
Try to do so: $array[0] = array('jujuba', 'bola', 'cachorro'); $array[1] = array('carro', 'da like', 'em mim o/'); echo "<pre>"; var_dump($array); var_dump(json_encode($array,…