Posts by Jedson Melo • 341 points
23 posts
-
1
votes1
answer43
viewsA: Doubt about Laravel’s basic structure!
Laravel’s standards should be followed and to facilitate the artisan which has several commands, for example, for model creation, for Factory, for controller, for Migration... Using the commands the…
-
0
votes1
answer20
viewsA: How to Pass Variable inside the function
Just use the use (), would look like this: function ($m) use ($email) { $m->from('[email protected]', 'Triplxx Receptivo'); $m->to("$email");…
-
0
votes3
answers563
viewsA: Pass view data array to Laravel controller
I believe the simplest would be something like: @php $route = route('pdf.relatorioPessoa'); $nome = $dataform['nom_nome']; $endereco = $dataform['nom_endereço']; $cidade = $dataform['nom_cidade'];…
-
2
votes1
answer374
viewsA: Validation error in Laravel update
The Unique validation receives parameters in order... first the table, second the column and third the id that should be ignored. 'email' => "required|email|unique:contacts,email,$contact->id"…
-
-1
votes4
answers1367
viewsA: Save dates in the right format (Orange)
It will depend on your bank if you have created a field with format Date he probably expects a Y-m-d for you to save in the graduate d/m/Y you will have to add in a string field, or something like.…
-
0
votes4
answers135
viewsA: Quey Builder with IF condition in Lockable
Why not consult the current date less 30 days? Will return payments that were made 30 days... return $this->hasMany(Payment::class)->whereStatus('3')->where('updated_at', '>=',…
-
1
votes1
answer236
viewsA: Problems with the vendor/bin folder of an Laravel application
Deletes vendor folder, adds in . gitignore and in vpn runs the composer install.
-
1
votes1
answer38
viewsA: Doubt of structure using Global Scopes in Laravel
If the products will always be filtered by the store id, then I believe that the broker would put a global scope even... as the general listing is only in one place, in this query you use the…
-
0
votes2
answers1881
viewsA: Laravel - Passing Variable To View - Record Page
The RegisterController implements the trait RedirectsUsers, in this trait she implements the method showRegistrationForm() which is the method that is called when you access the route /register,…
-
1
votes3
answers298
viewsA: Create table in Mysql using Laravel
A change to Laravel from version 5.4 will cause mysql 5.6 or earlier versions to show this error. To fix just go in the file AppServiceProvider.php and in the method boot() you add…
-
0
votes2
answers643
viewsA: Create and edit data from a table with Laravel relationship
Using the relationships that the ORM Eloquent provides. In your case you have a relationship of Many to Many for between schedule and responsible, so just set up the models by following the…
-
0
votes3
answers653
viewsA: List 3 tables in Laravel
This relationship we call many to many, in the documentation of the Standard shows how to deal with it with the eloquent (https://laravel.com/docs/5.7/eloquent-relationships#Many-to-Many). In the…
-
0
votes1
answer232
viewsA: Login with permissions Laravel 5
You can rewrite the login function on LoginController, and within the if who checks his credentials auth()->attempt() you can put another if checking if you are a student or teacher, and…
-
0
votes0
answers512
viewsQ: Change sent email templade to reset password in Laravel 5.3
I created the authentication module for my application with php artisan make:auth and the password reset method is created automatically by him, ta everything running blz... what happens is that I…
-
2
votes2
answers1485
viewsA: I don’t understand why Empty says the variable is not empty
You can use the method of the own isEmpty(), would be: @if($aniversario->isEmpty()) Reference: Laravel Documentation…
-
0
votes2
answers1212
viewsA: How to pass parameters to the Resource controller directly from the View with Helper url()
You can do it using route() in place of url(), but in route() you use the name of the route and not the path... as you used the method Route::resource() these names were given automatically, to see…
-
1
votes1
answer431
viewsQ: APP_URL of . env record entire URL (in addition to the domain) of the application
I have a server with a domain where there are several Laravel applications, for example, the path of the application1 is like this: https://dominio.com/aplicacao1/public The problem is that when I…
-
-1
votes1
answer623
viewsQ: Bootstrap Collapse animation does not work
Good evening, I would like some help... I’m trying to use the Boostrap 3.3 Collapse in a row of a table, the code is like this: <table> <thead> <tr> <th>header</th>…
-
0
votes1
answer336
viewsA: Validation with AJAX in Laravel
I found the solution, a very good tutorial that works for real in Laravel 5.3 http://itsolutionstuff.com/post/laravel-5-ajax-request-validation-exampleexample.html…
-
0
votes1
answer336
viewsQ: Validation with AJAX in Laravel
Talk personal, I would like to know how to make validations with AJAX in Aravel, I have tried several ways and it does not work, not put the code because I had given up there I have no more rsrs...…
-
3
votes1
answer324
viewsQ: Required_if with more than one field in Laravel 5.3
I have the following situation: I want one field to be mandatory only if the other two are null, if one of the other two is not null this field is no longer mandatory. I thought I’d use the…
-
2
votes4
answers1609
viewsA: Mysqli_fetch_row() expects Parameter 1 to be mysqli_result
The method mysqli_fetch_row() receives a query result, in your case you are inserting a connection. I think what you need is to pass the $result0 in the method mysqli_fetch_row(). would look like…
-
3
votes1
answer345
viewsQ: How to check credentials before authenticating to Laravel 5.3?
My application uses Laravel’s ready authentication, but I need users to log in from a web service. So what I’m trying to do is that if the guy exists in the application database, he does Laravel’s…