Questions tagged as 'laravel'

1
answer

Why are you giving error in the protect variable saving manually?

I am inserting a record manually (without the create) getting data from the dorm and saving but it is giving an error in the variable $ request and I am not able to solve. It is declared in the same controller as below: class OrdemservicoCo...
asked by 13.01.2017 / 21:54
1
answer

Http post method, date parameter is always empty (Angularjs + Laravel 5.2)

I'm using angularjs + laravel to build my application. The question is, I have a $ scope.frequencias, which contains some information on the frequency of a student. I did a foreach angle to send this data to the bank, but my date parameter (whic...
asked by 21.10.2016 / 18:43
1
answer

Get created registry ID Laravel 5

I have the following code for creating a report: $this->repository->create($request->all()); return response()->json(['sucesso' => 'Relatorio cadastrado com sucesso.']); How do I get the created record ID and put it together...
asked by 17.11.2016 / 18:46
3
answers

Update with Laravel does not take the model id

I'm trying to perform a simple function to change the password of the user logged in using the code: $user = User::find(\Auth::user()->idusuario); $user->password = bcrypt($request['novasenha']); $user->save(); But, it does not wor...
asked by 06.09.2016 / 14:11
1
answer

How to use the hasmany relationship in laravel 5.2?

I have 3 tables of funcionário , apontamentos and horastrabalhadas . My relationship is hasmany 1 employee has multiple apontamentos . When I show the result with a dd() , the employee data comes twic...
asked by 28.12.2016 / 18:34
2
answers

Where to treat data in an MVC project

I'm using Laravel as an example. In Controller I do 2 searches. public function index() { $page_title = "Relatório"; $projetos = Projetos::orderBy('alguma_coluna')->get(); $subprojetos = Subprojetos::get(); ret...
asked by 22.09.2016 / 19:14
2
answers

Snappy does not render image in pdf?

I'm using Snappy to generate reports, however it's not rendering the image I load in my html, what can it be? Code: Route::get('/report', function(){ $pdf = PDF::loadView('templates.report'); return $pdf->stream(); });...
asked by 26.07.2016 / 14:50
2
answers

Request in url with laravel

I'm trying to start in Laravel , and I'm having problems with requests , when I only do request like localhost:8000/hoteis everything works it fetches the page and works perfectly, but if% it is not working, the route f...
asked by 30.07.2016 / 01:17
1
answer

Laravel - "insecure" route

I'm doing a function to evaluate a transaction between a customer (company) and his client (final consumer). There an email / sms is sent to the end consumer with a link to him assessing the transaction quickly by the same phone. I thought of ma...
asked by 31.07.2016 / 19:22
2
answers

Column Is Not Found With Inner Join

Lines: 1 - Data coming from the filter form 2 - This with I enter into a Model relationship function. I do this because I need to sort my list in order of the MEDIA column. Home 3 - The strange thing is that I need to do an INNER JOIN fo...
asked by 24.05.2016 / 16:54