Questions tagged as 'laravel'

0
answers

How to record and display images using PostgreSQL and Laravel 5.1

I have the following code in my Controller to save the image to the database, there is no error so I think it works fine. $data = Input::file('assinatura'); $escaped = bin2hex($data); $tecnico->assinatura = $escaped; $tecnico->save();...
asked by 16.02.2016 / 13:20
1
answer

Problems using Query Builder in Laravel

I have manipulated the DB data with the creation of Models, but in my most recent project I am tending to make use of Query Builder, but this is going wrong. I would like to understand what is missing so that the code works perfectly. To begi...
asked by 19.03.2016 / 14:41
2
answers

Update many fields of a model

I use the following method to update a table from form: public function postEdit(){ $produto = Produto::find(Input::get('id')); $produto->nome = Input::get('nome'); $produto->descricao = Input::get('descricao'); $...
asked by 19.03.2016 / 14:33
0
answers

Problems with Composer and Laravel 5.0 on Mac El Capitan

I'm having the following error, after running a command to install a versioned project. Script php artisan clear-compiled handling the pre-update-cmd event returned with an error [RuntimeException]   Error Output: PHP Fatal error: Class...
asked by 06.04.2016 / 14:45
0
answers

How to construct an Object with an Array inside, using Eloquent Laravel

Hello everyone, I need to build a array as follows for a plugin: var data = [{ "label": "Follows", "color": "#aad874", "data": [ ["Seg", 50], ["Ter", 84], ["Qua", 52], ["Qui", 88], ["S...
asked by 07.02.2016 / 04:02
0
answers

Slow to load image of Mongo with PHP

I'm developing a system that uses Mysql as a database and Mongo BD for image storage. The problem is that the loading of the images is very slow. NOTE: I am using laravel 5.2. Function that loads image: $db = new Conection("imagens"); $im...
asked by 01.02.2016 / 12:37
3
answers

Return data from a URL with Query String

There is a service that needs to send data via query string and it gives me a JSON return, however, I'm not getting this return, it does not send the query string. $url = 'https://www.servico.com.br?nome=abc&cpf=abc&cep=abc' Having...
asked by 04.02.2016 / 18:46
0
answers

Route post ajax Laravel

Galera I have a search field for ajax in laravel that works normally local but on the server it is returning error. When the search route (post -> link ) is triggered by the keyup event of error 301 Moved Permanently and then again (mysteriousl...
asked by 12.02.2016 / 16:38
0
answers

Cycle of execution of ordered migrations in Laravel 5, how to change it?

I'm starting to use this framework and I noticed that migrations when not created in a running cycle for execution can be several errors, is this normal? For example, if you create a migration city but it has a constrai...
asked by 25.02.2016 / 04:41
0
answers

Accessing a value from a json array in Ajax

I'm working on a project in Laravel. I'm doing a dynamic search function using Ajax and Json. Function in controller: public static function busca_ajax() { $query = Input::get('query'); $resultados = Produto:...
asked by 02.03.2016 / 17:56