Posts by Mauricio Wanderley Martins • 332 points
12 posts
-
0
votes2
answers27
viewsA: Auto-increment not working in Laravel
The error is in the process of sending the idprofessor on the object, because if you want autoincrement, you should not load the attribute on the object in the controller layer, considering the…
-
1
votes2
answers6052
viewsA: How to access another machine’s database
To allow external access to mysql database on a remote server, is to configure it for external access. Access the file my.cnf and modify the IP parameter bind-address = 127.0.0.1 for 0.0.0.0 Restart…
-
0
votes2
answers1168
viewsA: Relative path to Angular 4 source files
When you create a project with ng cli, a file is created at the root of the project: .angular-cli.json inside this file Voce has the tag styles e scripts. So Voce just need to add the broker paths…
angularanswered Mauricio Wanderley Martins 332 -
1
votes1
answer622
viewsA: Validation of PHP form
The simplest validation would be to add a required to the inputs, so it would only send if at least the inputs were loaded, or can enter Javascript code to check, as below: <script…
-
1
votes1
answer430
viewsA: Doubt in the use of Socket in java on android
You can have devices communicate point-to-point, no problem. Just keep in mind that: there must be a device that will be treated as a server, that is, who will be listening to a direct connection.…
-
1
votes1
answer444
viewsA: Add field to standard registration form of Laravel 5.3
I believe the problem is in the fillables of your Model User, I recommend two changes: 1 - Improve Migration to have a default value on type. public function up() { Schema::create('users', function…
-
-1
votes2
answers798
viewsA: How to create a scheduled task
The Artisan was missing at the end of the directory, so it looks like this: * * * * * php /var/www/html/mail-with-cron/artisan schedule:run >> /dev/null 2>&1…
-
1
votes1
answer129
viewsA: MVC standard for Controller in codeigniter
Danilo, I advise you to add an intermediate layer to receive the business rules. It would be between the Controller and the Model, normally this layer is called Service. So the replication of the…
-
1
votes1
answer1252
viewsA: Creating and configuring email in AWS (SES)
1 - User configuration is used in SMTP type sending, so Voce only needs the domain. 2 - Setting up MX on route 53 is only necessary if you want to receive email via user@'your domain', in which case…
-
1
votes2
answers591
viewsA: Popular select with database values
When Voce recover the data try to turn it into a list as follows: $associados = Associado::all()->lists('associado','id'); The list transforms the result into an array with KEY and Value, the…
-
2
votes1
answer634
viewsA: Route without authentication Laravel
If authentication is done through middleware Route::group(['middleware' => 'auth.basic'], function() { //Rotas autenticadas }); //Rotas não autenticadas Route::get('approve', ['as' =>…
-
1
votes4
answers1103
viewsA: Update with Laravel does not take model id
When doing this function, Voce already loads the user variable with the authenticated user. $user = \Auth::user(); $user->password = bcrypt($request['novasenha']); $user->save();…