Posts by Fábio Jânio • 3,407 points
226 posts
-
1
votes1
answer178
viewsQ: How to add password exchange notification in Laravel?
For security reasons, in one of the applications I am building, whenever the user’s password is changed this must be notified. To meet this goal I override the method resetPassword class…
-
3
votes1
answer80
viewsQ: When using back() in the Laravel this should be preceded by redirect()?
Observing many implementations I saw that the staff uses with a certain frequency return redirect()->back()... My question is: What’s the difference between return redirect()->back()... and…
laravelasked Fábio Jânio 3,407 -
0
votes1
answer718
viewsQ: Controller or Resource controller, how do I determine which one to use?
I am creating a small application using the Laravel 5.6, however, I’m having difficulty determining the route nomenclature, or rather, to determine whether or not I use resource Controller. I…
laravelasked Fábio Jânio 3,407 -
1
votes0
answers79
viewsQ: How to integrate Travis-ci with Docker Hub in a practical and efficient way?
I’m creating some Dockerfile + configuration files for my images, currently I push to Github, later Travis-ci picks up the files and generates a build, ending makes the push to the Docker Hub. In…
-
4
votes2
answers6011
viewsQ: What is the meaning and form of volume use in Dockerfile?
In a Dockerfile file what is the meaning of the instruction: VOLUME /arquivos I imagine it creates a volume, but how it’s used and what its real meaning is?
-
1
votes2
answers846
viewsA: Access denied when trying to push to Github
I thought the problem was just what I didn’t expect. In the git settings everything was correct, the problem was in the macOS keyring, he saved an old login with user123, when I was running a push…
gitanswered Fábio Jânio 3,407 -
0
votes2
answers846
viewsQ: Access denied when trying to push to Github
I’m having trouble pushing to a repository on Github: remote: Permission to fabiojaniolima/laravel-boot.git denied to user123. fatal: unable to access…
gitasked Fábio Jânio 3,407 -
0
votes1
answer36
viewsQ: Warning when calling orderby method statically
In the Phpstorm interface is displayed a warning message stating that I am calling the orderby method in a static way, however, this is not static. My call: Artigo::orderBy('edicao',…
-
2
votes2
answers808
viewsQ: How to automatically move data to the view in Laravel Resource Controller?
I am using Laravel 5.6 with Resource Controller. My show method: public function show(Artigo $artigo) { $artigo = $artigo->first(); return view('painel.revista.detalhes', compact('artigo')); } It…
-
1
votes1
answer221
viewsQ: How to determine the most suitable data type for a fixed-size numerical field?
I’m having a doubt about the characteristic of some attributes of my table. Problem: I have to keep an identification number of my items, this is always composed of 3 digits (zero left in case of…
-
1
votes1
answer348
viewsQ: How to structure a good controller with Laravel Socialite?
I’m using the Socialite to provide authentication via account providers (Facebook, Twitter, Linkedin...). In my application, when authenticating via provider, if there is already an association of…
laravelasked Fábio Jânio 3,407 -
1
votes1
answer43
viewsQ: What is the real benefit of using Controller Resource in Laravel?
What is the real benefit of using Controller Resource in Laravel? It is possible to observe that the route file gets cleaner, since the controller methods are called based on the call routes and…
laravelasked Fábio Jânio 3,407 -
0
votes1
answer139
viewsQ: Error while working with date formatting in Laravel
I’m having a little trouble manipulating a input of the kind date. When using this type of input the date is formatted as Y-m-d, but in my form I want to type dd/mm/yyyy. Model User: //... protected…
-
0
votes1
answer46
viewsQ: How to format field names in the output of Laravel validation messages?
I’m using $this->validate() to perform field validation in Laravel, how can I apply an underscore in the name of the fields automatically in the output of all messages referring to validation…
laravelasked Fábio Jânio 3,407 -
0
votes1
answer363
viewsQ: How to show validation message below a group of radio buttons?
For the problem below consider that I am using Laravel (5.6* with default style files and javascript (no changes). My problem is basically when trying to display the validation message from the…
-
0
votes1
answer47
viewsQ: How to proceed when having to apply an emergency Hotfix?
If I’m working on a branch for a new feature and need to quit to create a Hotfix. How to proceed? Should I apply a "temporary" commit to the current branch or have another approach?
gitasked Fábio Jânio 3,407 -
1
votes1
answer1179
viewsQ: How to work with Fork of a project?
I made the Fork of a project, made the appropriate changes, pushed to my repository on Github and there generated a pull request to the original project’s Object. After a few days I decided to make…
-
2
votes1
answer360
viewsQ: How do I work with branch merge conflict management?
I did a quick study on git-flow, but I didn’t identify how it works on the merge conflict issue. In an article I read, the author mentioned each contributor pulling the repository, managing…
-
12
votes2
answers1088
viewsQ: How to work efficiently with branch in git?
I’m trying to define a working scheme to keep my repository on Github organized, but it is difficult to reach a solution. My "idea": I thought about keeping the branch in the remote repository…
-
1
votes1
answer628
viewsQ: How do I work with git release?
The appeal release Is Github a platform resource or Git itself? I ask this because I didn’t see this feature in Bitbucket.…
-
3
votes1
answer576
viewsQ: How to pull files from the repository without generating merge commit?
How can I get new files from the repository without committing Merge branch 'master' of...? I’m using: git pull It pulls everything cool, however, creates this merge commit. How do I only have…
-
2
votes1
answer13
viewsQ: What approach should be used in Resource type controllers to list and search for items?
I created the controller Artigocontroller of the kind Resource, then I have the verbs and default routes. I use the method index from my controller to list all articles (paged): $artigos =…
laravelasked Fábio Jânio 3,407 -
3
votes1
answer1571
viewsQ: What does "{{ __('Login') }}" mean in the Laravel layouts file?
In the archive \resources\layouts\app.blade.php has the following line 37: {{ __('Login') }} It seems that this is a Helper. But what is its meaning/functioning? I ask this because depending on the…
laravelasked Fábio Jânio 3,407 -
1
votes1
answer1263
viewsQ: What is the default value of MAIL_ENCRYPTION in Laravel 5.6?
My doubt boils down to the definition of MAIL_ENCRYPTION, in the archive .env we have MAIL_ENCRYPTION=null and inside the archive config\mail.php line 74 we have the stretch: 'encryption' =>…
laravelasked Fábio Jânio 3,407 -
2
votes1
answer125
viewsQ: How to set up an Anonymous Global Scopes in Laravel?
Inside my model I’m using a Anonymous Global Scopes to miss some operations: protected static function boot() { parent::boot(); static::addGlobalScope('owner', function (Builder $builder) {…
laravelasked Fábio Jânio 3,407 -
1
votes1
answer981
viewsQ: How to name table pivot Many-to-Many
How to name pivot tables in Laravel, so that it is not necessary to inform its name in the relationship method (belongsToMany)? In the documentation I found this reference: Many-to-Many Relations…
laravelasked Fábio Jânio 3,407 -
0
votes0
answers26
viewsQ: Accent problem when generating epub with gitbook
I’m having a hard time generating one epub using the gitbook. I performed the installation of gitbook-cli and nodejs, later configured the book.json file as follows: { "title": "Distribuição…
jsonasked Fábio Jânio 3,407 -
0
votes1
answer314
viewsQ: How to extract information via regular expression?
I have the following string: adapter-UDP02_sistem10_a.log How to extract the stretch UDP02 via regular expression? The logic being: capture everything after the - (hyphen) and before the first _…
regexasked Fábio Jânio 3,407 -
0
votes1
answer251
viewsQ: How to organize project versions on Github?
I have an old project that was written in Laravel 5.3, recently rewrote all the code using the version 5.5. My question is how to organize this in Github, currently the master branch supports my…
-
0
votes0
answers10
viewsQ: How to return an error code in bash if a condition is not true?
I’m using the Travis-ci for an ongoing integration process, however, I’m having difficulty performing a specific validation after installing some components (apache, php...). I currently have the…
continuous-integrationasked Fábio Jânio 3,407 -
1
votes0
answers107
viewsQ: Docker Hub + Travis-ci: how to generate an automatic Description?
I have been struggling for 9 hours to achieve a continuous integration between Github > Travis-ci and Docker hub. So far I’ve managed to achieve the following goal: I push to Github, at this…
-
0
votes0
answers16
viewsQ: Doubt about the default default definitions override of php.ini
I have a file php.ini custom, if I omit all variables I haven’t changed and keep only my custom settings, PHP will consider for the omitted variables the default value? For example, if I modify the…
phpasked Fábio Jânio 3,407 -
0
votes2
answers1756
viewsQ: How can I automatically execute a script when creating a container?
I have the following need: when creating a new container I would like to automatically run the script /usr/local/bin/start inside the image, this script basically checks whether the variable…
dockerasked Fábio Jânio 3,407 -
2
votes2
answers584
viewsQ: Doubt regarding the structure of the Docker-Compose.yml file
I have the following file Docker-Compose.yml: version: "3.3" services: mysql: container_name: mysql image: mysql:5.7 environment: MYSQL_ROOT_PASSWORD: senha_root MYSQL_DATABASE: database_name…
-
0
votes1
answer341
viewsQ: Is there a difference in "connecting" to the container via Docker attach or Docker exec?
My question is: is there a difference in "connecting" to a container using the instruction docker attach and docker exec -it container /bin/bash? My container was created this way: docker run -it -p…
dockerasked Fábio Jânio 3,407 -
5
votes2
answers872
viewsQ: How to prevent http auto-redirect to https?
My web development container uses the image php:7.1-apache. To make it easier to memorize the address of the applications contained in this container, I like to edit my machine’s Hosts file and make…
-
0
votes2
answers37
viewsQ: How to set alternately the background color of sections of a CSS page?
Within the body of my HTML document have a sequence of 5 sections, this number may vary depending on the situation. I would like to define a different highlight (background) for each Service "par",…
cssasked Fábio Jânio 3,407 -
1
votes0
answers32
viewsQ: How to organize gulpfile.js for processing Sass, js, img and html?
After much effort and countless attempts, I managed to write a gulpfile.js that meets my needs regarding file build Sass, js, img and html, however, I’m still having some problems. First we go to…
-
1
votes0
answers33
viewsQ: How to use Gulp to auto copy source files when compiling scss?
I’m using Gulp with Gulp-Sass to build my css files. I would like to build the SCSS source files referenced by @font-face within the style be automatically copied to Assets/fonts, while the css…
-
1
votes1
answer67
viewsQ: How to generate temporary image for development environment?
Some time ago I found a post that showed how to generate temporary images, an image with gray background and a background marking containing the dimensions of the same. This image is generated…
-
1
votes0
answers44
viewsQ: How to set the images and fonts directory in Laravel-mix?
I am using the Laravel-mix in a personal project, however, without the presence of the Laravel Framework. When I have the files generated, Laravel-mix reads the Sass files and creates a directory…
-
2
votes1
answer244
viewsQ: How to turn list into responsivel menu?
I’m having a hard time turning the list below into a responsive menu, something like Bootstrap’s responsivel navbar. I want to maintain the current style of the menu, but that it behaves like the…
-
1
votes1
answer28
viewsQ: Doubt about HTML5 semantics
I am writing a page with HTML5 semantic standards in mind. See: <section id="experiencia" class="section section-center"> <header> <h2>Experiência</h2> <p…
html5asked Fábio Jânio 3,407 -
0
votes1
answer58
viewsQ: How to work with flat and minified files?
When writing a file .html, .css or .js we use its flat form, but when playing in production we use preferably minified files, usually named .min css., .min js.... The question that brings me here…
-
0
votes1
answer73
viewsA: How to simplify scroll to Section and back to top actions
I managed to solve my problem by producing the following result: Back to top button (btn-scroll-top): <a href="#" id="btn-scroll-top" class="back-to-top" title="Voltar ao…
-
0
votes1
answer73
viewsQ: How to simplify scroll to Section and back to top actions
I have the smooth scrolling menu functions for a One Page sessions as well as a smooth Back to Top: var $doc = $('html, body'); $('a').not('#back-to-top').click(function (e) { e.preventDefault();…
-
1
votes1
answer40
viewsQ: Condition to ignore ".min.js" files
I have the following task in my gulpfile.js which renames files .js for .min js.: gulp.task('js', function () { return gulp.src(paths.scripts.src) .pipe(gulpif(prod, uglify())) .pipe(rename({…
-
0
votes1
answer496
viewsA: Show code in textarea
You need to find all html entities. Most languages already have some automatic way to escape code. In Java, using JSTL in JSP, you can do so: <c:out value="${valorAqui}" escapeXml="true"/> In…
-
0
votes2
answers740
viewsA: Inner Join mysql 2 tables
The problem is that you are trying to access 2 indexes that do not exist br_estado.name and br_regiao.name. On the return of select you are returning 2 columns, both have the same name/title, before…
-
1
votes1
answer1297
viewsQ: How to work with data validation in Laravel
I’m currently working with Laravel 5.5, however, this question applies to "all versions" because of its generalisation. My question is: am using $this->validade to validate data coming from form.…