Posts by Ademir Mazer Jr - Nuno • 2,258 points
84 posts
-
1
votes2
answers345
viewsA: Results per logged-in user id
As described in the manual https://laravel.com/docs/5.4/eloquent-relationships, in One to One relations you must create a function that returns a namespace object…
-
0
votes1
answer139
viewsA: Idea of Event in the Laravel
Events should be used to perform functions when an action occurs in the system, the controller will be responsible for, for example, saving the model, so it triggers an event that can be called…
-
2
votes1
answer1326
viewsA: Laravel 5.3 - Events or Observers?
The Observers models are great for creating functions specific to the actions performed to the model itself. I use whenever I need to keep the code cohesive and organized in relation to the model,…
-
0
votes2
answers66
viewsA: Help with Jquery + Php
The id property will only be used in the browser, but name yes will be used to mount the request data, for sure you need to pass as an array, in this case using, for example: name = "a[]". But note…
-
4
votes1
answer3070
viewsA: Pass Jquery variable to PHP
You need to send via Ajax (Javascript call). Understand that when running javascript in the browser you are "disconnected" from the server. Therefore, you will need a server-side PHP script to…
-
1
votes1
answer112
viewsA: LARAVEL - How to share images between projects
Actually the Symbolic native Laravel link is for a directory mapping of a single project. What you can do is create a default directory in your file structure, and make a symbolic link to this…
-
0
votes1
answer592
viewsA: How do I log into the AUTH (Laravel) with data from a third-party API ?
In this case you will not use the default authentication controllers, create the routine that receives the entry of name and password, call the API and with the result, being "Login released" please…
-
0
votes1
answer266
viewsA: How to remove photos from public folder or protect to not be accessed by URL using Intervention image with Laravel?
Change the line where you save the image, change the helper to point to the Storage directory and not to the public folder: Image::make($avatar)>resize(300, 300)>save(…
-
6
votes2
answers912
viewsA: Good practices for PHP MVC
MVC is a design standard. Design standards should be employed to solve a common and standardized "problem", allowing proven solutions and/or standardize architectures allowing a team to work…
-
0
votes2
answers277
viewsA: Query using INNER JOIN with problem
Complementing @Rodrigo Rigotti’s response INNER JOIN returns records from two tables, for example A and B, when a record with ID in A is equal to a record with foreign ID in B. Example ... A INNER…
mysqlanswered Ademir Mazer Jr - Nuno 2,258 -
3
votes1
answer62
viewsA: Help with INNER JOINS
The correct modeling of your tables would be the customer code being associated with the sale (which is the header) and each sales item (details) being associated with the sale, something like this:…
-
1
votes1
answer364
viewsA: Command Laravel
When you add Jobs to an execution queue (Queue), you must pass all the required data. For example, if it’s a job to resize a user’s avatar, the information you need is the user’s id so you can load…
-
1
votes1
answer102
viewsA: Problems entering entire data into Sybase using Laravel
After several attempts of packages and drivers we have found that the problem is weak support for Sybase by PDO drivers allied to Eloquent behaviors that are common to Dbms that it supports natively…
-
1
votes1
answer102
viewsQ: Problems entering entire data into Sybase using Laravel
Hello, I’m having trouble inserting values into tables with entire data type columns using Laravel 5.1 and Sybase. Error 257 is listed when the exception is thrown. In the Sybase manuals it seems to…
-
-1
votes1
answer669
viewsA: How do I make sure a person can’t book a room on the same day?
whereas the camps checkin and checkout are the dates, you have some alternatives: 1) Set a unique index in the database with the fields: nome, checkin, this way the person does not make two…
-
2
votes1
answer392
viewsA: JSON-RPC or RESTFULL?
One of the most common misconceptions is that any call that uses HTTP verbs such as GET, PUT, POST rather than using SOAP links to expose an end-point service is called "Restful". This blurring of…
-
1
votes2
answers353
viewsA: Form post does not work in Laravel 4
Request::getMethod() returns the http (verb) method used in the request. Strange to be returning GET if you have posted to your html form. To recover parameters sent in the request, you must use…
-
1
votes3
answers176
viewsA: How to get the line separation of the system
As a practical application, I imagine the idea is to identify the line break (line ending) by the S.O. to be able to swap for an HTML tag, for example, to show in real time the output of a textarea…
javascriptanswered Ademir Mazer Jr - Nuno 2,258 -
25
votes4
answers3803
viewsA: What is spaghetti code?
It is a code with flow complexity, usually in a constant line of execution, where it mixes execution jumps using unconditional deviation structures, such as the GOTO, END, etc.. An example with…
-
3
votes1
answer4355
viewsA: How to calculate the difference between two dates by ignoring weekends in Java without using a loop
As @Math said, the right thing would be to ask and put your answer. Then mark your answer as accepted, so the question does not appear in the unanswered OS questions. Anyway I will add an algorithm…
-
8
votes3
answers151
viewsA: Doubt in select de sql
select * from tabela where 'data de pesquisa' BETWEEN dt_inicial AND dt_final The * in select means return all fields in the table, and provided that dt_initial and dt_final are of the correct date…
sqlanswered Ademir Mazer Jr - Nuno 2,258 -
1
votes2
answers945
viewsA: Is it possible to exchange route system ($route) in the same URL? Angular JS
You can use ng-switch to exchange a DOM element that contains a directive. For example: angular.module('meuModulo') .config(['$routeProvider’, ‘go.svc.config’, function($routeProvider, config) {…
angularjsanswered Ademir Mazer Jr - Nuno 2,258 -
27
votes2
answers30102
viewsA: What is WSDL (Web Services Description Language)?
WSDL is a description in XML format of a Web Service that will use SOAP / RPC as protocol. It is the acronym for Web Services Description Language (Web Services Description Language). RPC - Remote…
-
3
votes1
answer5562
viewsA: Generate pdf with Javascript or Angularjs
I know two, one converts Markdown to PDF, the other uses a FPDF-like syntax scheme. https://github.com/MrRio/jsPDF https://github.com/devongovett/pdfkit https://github.com/alanshaw/markdown-pdf I…
-
2
votes2
answers497
viewsA: Query mysql does not work with variable - PHP
Grouping the answers that are in the comments section, credits @Jader and @papa-charlie: $("#agendanome").html() may be sending together HTML tags or blank spaces/lines. To resolve using Trim() and…
-
1
votes2
answers227
viewsA: Traverse Array within a string
Using your code as a basis: $produtoImpressao = $_SESSION['produtoImpressao']; //Array de produtos $fp = fopen("manifesto_$checkdid.txt", "a"); //Abre/cria arquivo .txt $escreve1 = "Manifesto…
-
2
votes2
answers347
viewsA: change function the loading of jquery pages for onclick
If I understand what you want, you can create a new attribute for it <a href="a.php" out-href="b.php">Link label</a> Then change your code to: $(document).ready(function(){ $('.postss…
jqueryanswered Ademir Mazer Jr - Nuno 2,258 -
6
votes3
answers25078
viewsA: Resize images using Bootstrap
Twitter Bootstrap does not have a specific class for this. You can use the Bootstrap grid scheme to let the image presentation rest within a suitable page context using the markup example below:…
-
1
votes1
answer375
viewsA: Sending email to many people
Apparently the problem is not in your code. As stated in the comments, it seems to be the limitation imposed by the server. If you want to continue using your code and not hire a mailing service,…
phpanswered Ademir Mazer Jr - Nuno 2,258 -
1
votes1
answer49
viewsA: Correct ZF1 foreach in view
Changes your foreach and uses an auxiliary array: $pegaId = array(); foreach ($agendados as $servidor) { $this->id = $servidor->srh_periodo_aquisitivo_sca_pessoa_idPessoa; $tabPessoa = new…
-
1
votes2
answers479
viewsA: Soft Delete and relationships in Laravel 4
I already needed this in a project and what I did was to perform a search before performing soft-delete. In my case it was quiet because only 2 tables had relationship with the one that was being…
-
0
votes2
answers349
viewsA: Design table of "workflow"
I believe that modeling with information in the tables is ideal, pointing out the order of each step. An example you can adapt to your need: Tables Grupo {id, nome} Usuario {id, nome} Membro…
-
1
votes2
answers1164
viewsA: How to identify if an XML is GOOD?
I adapted the class below the article found in the link: Removing BOM Character from a String in Java import java.io.UnsupportedEncodingException; public class BOM { private String bomString = "";…
-
8
votes3
answers1402
viewsA: How can I simplify Urls for a website?
From what I understand you’re trying to treat all the rules in the . htaccess, I find this difficult because in your example it seems that will work with modules and submodules, but this is not a…