Posts by Mateus • 977 points
80 posts
-
1
votes0
answers79
viewsQ: Extender models of the setTable Passport does not work
I extended the 5 models of the Passport: I extended because I have to add Shema to the table name and for that I have used this function in the constructor of my other models: public function…
-
-2
votes1
answer67
viewsA: How to use the ROUND function in Laravel
Assuming you have the Register model created correctly. $transferencia = Register::where('ROUND(valor,2)',$json->VALORLIQUIDO)->get(); $transferencia =…
-
1
votes0
answers146
viewsQ: Problem using Route::Resource on production server
I’m making a system using the Laravel 5.6 I climbed to a server I have and access this externally But I’m having problems when the route uses the resouce, for example: Route::resource('materiais',…
-
1
votes2
answers1804
viewsA: Dompdf API for PDF generation in PHP
When you used the return $pdf->stream(); did not pass the file name to be mounted. return $pdf->stream('profile.pdf'); That should work.
-
0
votes0
answers30
viewsQ: Problems to recover data after page redirection
I made a file to store the citizen data in an array, because only in another step will I have confirmation if I should actually store this data <?php namespace App\Services; class CidadaoStore{…
-
0
votes1
answer577
viewsQ: Return form with data after Validator failure
I have a user registration form on Laravel <form class="form-horizontal" method="post" action="{{url('/usuarios')}}"> @csrf @if(session()->has('message')) <div class="callout…
-
1
votes1
answer200
viewsA: Recover captured id with JS in modal
I got This is how the form: <form class="formdelete" name="formdelete" method="POST"> @csrf @method('DELETE') <button type="submit" class="btn btn-primary">Excluir</button>…
-
0
votes1
answer200
viewsQ: Recover captured id with JS in modal
I have a button calling a modal for exclusion confirmation, this is in a table, each row a button to delete the registration of that line But the way it is he always deletes the first item from the…
-
2
votes2
answers133
viewsQ: Commit only one element of two with the same name
I have a form, and in this I have to inform the neighborhood, however the element that stores the neighborhood information may vary according to the value of the city selected previously. Example:…
-
0
votes2
answers808
viewsA: How to automatically move data to the view in Laravel Resource Controller?
public function show(Artigo $artigo) { return view('painel.revista.detalhes', ['artigo' => $artigo->first()]); } Then I could access with {{ $artigo->titulo }}…
-
0
votes1
answer880
viewsA: How to Generate iOS App with React Native
First: React-Turn on is "Learn Once, write Anywhere." I mean, "Learn once, write anywhere." APP code for Android usually needs modifications for iOS. Now, as for the question, yes you need to…
-
3
votes2
answers1221
viewsA: What is the link command in npm for?
When you install a third party package in your project you need to point out the dependencies of these To android, for example, usually these have to be listed in android/app/build.gradle and in…
-
0
votes1
answer61
viewsA: Laravel, problem with Float fields
That should work: $select = 'round(geo('.$dados->latitude.','.$dados->longitude.',latitude_ocorrencia,longitude_ocorrencia),2) as distancia'; return \DB::table("view_pins_ocorrencias")…
-
2
votes1
answer1599
viewsQ: Save files with storeAs out of Storage folder
I have in an API in Laravel for file storage $request->file("file$i")->storeAs('categories', $nameFile) As it is it stores the data correctly in the address…
-
-1
votes1
answer329
viewsA: What’s the matter with you?
Logic to solve by example For your example you will have to create a logic where, for example if the usuario for the ciclano, in the table index where ciclano check whether indicacao != null If it…
-
6
votes2
answers1412
viewsA: Request Variable does not return input file
Your input is correct except for the fact that enctype="multipart/form-data" this is an attribute of form and not of input But with the form correct this does not interfere in sending Thus, despite…
-
2
votes1
answer1395
viewsQ: How to send application files to the API
I have an APP in React-Native and an API with Laravel Both are communicating correctly, sending APP data to the API and otherwise correctly Currently to send and receive requests in the APP I use…
-
1
votes1
answer555
viewsA: Error calling more than one function in onPress
I managed to sort it out like this onPress={() => { Actions.principal(); { request.manifestacaoAnonima( this.state.email, this.state.selected, this.state.manifesto, this.state.tipomanifestacao,…
-
2
votes1
answer555
viewsQ: Error calling more than one function in onPress
I have a Button with a onPress If I put this onPress thus: onPress={() => request.manifestacaoAnonima( this.state.email, this.state.selected, this.state.manifesto, this.state.tipomanifestacao,…
-
4
votes3
answers6131
viewsA: How to Save Data with Asyncstorage
For small solutions I like to use the lib React-Native-simple-store Or you can create a file, as an example my storage.js, and import the index.js of own simple-store import { AsyncStorage } from…
-
1
votes0
answers305
viewsQ: Search larger field in a table with Eloquent
I’m using Laravel for an API In my comic book I have a table called tbmanifestacao and in this table I have a column called nrmanifestacao I would like in my controller return the biggest…
-
-1
votes1
answer92
viewsQ: Problems when trying to return the api data be in a class
I built an api that returns the units I have registered in a DB but when trying to return these not passing import React, { Component } from 'react'; import axios from 'axios'; const api = { let:…
react-nativeasked Mateus 977 -
0
votes1
answer270
viewsQ: I can’t edit Input content that returns address
Through this code I receive the current address of the device: navigator.geolocation.getCurrentPosition( (position) => { this.setState({ latitude: position.coords.latitude, longitude:…
-
0
votes0
answers39
viewsQ: Error while trying to use function return in if
I’m using the Laravel with the layout Adminlte I did this function in the file config/adminlte.php to try to define when the sidebar menu appears: <?php use Illuminate\Support\Facades\Auth;…
-
0
votes1
answer53
viewsQ: Add Selected to option after equality check
I have the following select on a form in the Laravel: <div class="form-group has-feedback {{ $errors->has('nivel') ? 'has-error' : '' }}"> <label for="nivel" class="col-sm-2…
-
1
votes1
answer457
viewsA: How to use Blade-Laravel in an MVC project that is not running with Laravel?
The Blade is a template engine that is only provided with Laravel But there are some extraction projects of this to be used outside the Aravel, but never used so I have no way to state about its…
-
1
votes1
answer82
viewsQ: Breaking data divided by comma
I’m trying to make a tracker using Adian, a gps module and a gsm. I can receive the latitude, longitude and send to cell phone as SMS, but in cell phone I’m trying to build an application with…
-
2
votes0
answers157
viewsQ: Api returns data correctly when requested by localhost but not by ip
Yesterday I did this question: I made a REST api using Laravel, to an application that I’m doing , to perform the requisition tests I created a VM where is the api. Assign a fixed ip to this VM and…
-
2
votes1
answer54
viewsQ: Api returns data correctly by Artisan serves but not by apache
I made a REST api using Laravel, for an application I’m doing, to perform the request tests I created a VM where the api is. Assign a fixed IP to this VM and disable the firewall to not disturb. I…
-
2
votes1
answer312
viewsA: Change column names used to save timestamp
I found this example in documentation of the Laravel and it worked If you need to customize the Names of the Columns used to store the timestamps, you may set the CREATED_AT and UPDATED_AT constants…
-
2
votes1
answer312
viewsQ: Change column names used to save timestamp
When I store or edit data in a table by Larable this creates a timestamp using the fields created_at and updated_at But I have to store the data in a table shared with another system, and this uses…
-
-1
votes2
answers1448
viewsA: Consume data from an existing table in Laravel
No need to create the migration only the model This tool can help you: https://blog.especializati.com.br/criar-migrations-no-laravel-a-partir-de-banco-de-dados-existente/…
-
1
votes2
answers802
viewsA: Extract formatted_address from JSON return from Google Maps API
Code working (I got the answer on stackoverflow.with): componentWillMount() { navigator.geolocation.getCurrentPosition( (position) => { this.setState({ latitude: position.coords.latitude,…
react-nativeanswered Mateus 977 -
0
votes1
answer731
viewsQ: Open field with value set, but can be edited
I’m using the floatingLabel of Nativebase: <Item floatingLabel> <Label style={{ color: branco }}>Local da ocorrência</Label> <Input multiline={true} numberOfLines={4}…
react-nativeasked Mateus 977 -
0
votes2
answers802
viewsQ: Extract formatted_address from JSON return from Google Maps API
I’m using the google maps API to do the reverse geocoding but I’m not getting the formatted_address import React, { Component } from 'react'; import { Platform, Text, View } from 'react-native';…
react-nativeasked Mateus 977 -
2
votes1
answer213
viewsQ: Problems returning the address through geolocation
I’m trying to use the library React-Native-geocoder to return the address through the latitude and longitude of the device. In response to another question and some more research, I came to this…
react-nativeasked Mateus 977 -
2
votes1
answer3317
viewsQ: Error trying to migrate bd from Laravel to Postgresql
I’m using Postgresql "5.4.*" Using Mysql, after the php artisan migrate tdo ok. But now I need to use Postgresql in the project, but after changing the DB: DB_CONNECTION=pgsql DB_HOST=127.0.0.1…
-
0
votes1
answer531
viewsQ: Sending token via header or param
I’m using the JWTAuth to perform token creation for my API. I saw that at the time of the request I can send the token in the header or via param. I understand that by sending via header the token…
-
3
votes1
answer343
viewsQ: Error when using POST in Laravel API
I’m learning how to build an API using Laravel 5.4.*. In the Api.php: $this->get('products', 'API\ProductController@index', ['except' => [ 'create', 'edit' ]]); In the Product.php: class…
-
2
votes2
answers3284
viewsA: Create project in Laravel in previous version
I managed to solve by modifying the command: composer create-project laravel/laravel apiLaravel "5.2" for composer create-project laravel/laravel apiLaravel "5.2.*"…
-
1
votes4
answers320
viewsA: How to load a project in Laravel in an old version?
I had a similar problem now, but to create a project in version 5.2 From the commentary on: You can try using Composer: php Composer create-project Laravel/Laravel project name "5.4" I came to…
-
0
votes2
answers3284
viewsQ: Create project in Laravel in previous version
When I create a project in Laravel this comes in version 5.5, however I am following a tutorial and error code to run. I believe it is because the tutorial is used version 5.2 of Laravel. I decided…
-
1
votes1
answer428
viewsQ: Use Geocoder to return the device address
I want to put in my application a button that when pressed returns the current address of the cell phone. The latitude and longitude I am managing to return correctly, and to convert this data into…
react-nativeasked Mateus 977 -
2
votes2
answers1460
viewsA: Return address through geolocation
The library must be used React-Native-geocoder to reverse latitude and longitude at addresses.
react-nativeanswered Mateus 977 -
1
votes2
answers1460
viewsQ: Return address through geolocation
In the application I am developing would like to put a button that when pressed returns the current address where it is. I was able to do the geolocation part and I can get the current latitude and…
react-nativeasked Mateus 977 -
4
votes1
answer1020
viewsQ: Input field with floating label design and mask
In the app I am building I intend to use in a form fields Input styled design Floating label I tested some libraries that have this type of field and considered better the Nativebase.io, however in…
react-nativeasked Mateus 977 -
3
votes1
answer1374
viewsQ: What is the unit of measurement of CSS measures in React-Native
When creating an application I put the buttons by hitting the CSS with the layout, but now I have to create images to put in place of these buttons. That’s when I came up with a big question,…
react-nativeasked Mateus 977 -
0
votes1
answer154
viewsA: Error while switching View to Scrollview
Well, I managed to make the mistake disappear, even though the Scroll doesn’t work. In place of: <ScrollView style={styles.geral}> Placed: <ScrollView…
react-nativeanswered Mateus 977 -
0
votes1
answer154
viewsQ: Error while switching View to Scrollview
I am making a page with a menu of 6 elements, divided 2 per line. And this presents everything right the way I want on most screens, but when testing in the emulator of a screen 3,2' this cuts the…
react-nativeasked Mateus 977 -
1
votes1
answer605
viewsQ: Create modal window
I’m starting an app: import React, { Component } from 'react'; import { StyleSheet, Text, View, StatusBar } from 'react-native'; import Button from 'react-native-button'; import { Actions } from…
react-nativeasked Mateus 977