Questions tagged as 'laravel'

1
answer

Eloquent Laravel - Migration e Model

Could someone give me an example of how I make a relationship in the migration and model, where this relationship results in a table with external ids. Example: A reseller by having no or n addresses, and an address can only have one resal...
asked by 10.10.2018 / 19:08
1
answer

PHP Laravel Blade {{{name or 'Default'}}} printing 1

According to the Laravel documentation {{{ $name or 'Default' }}} should behave like if(isset($name)) echo $name else echo 'Default' or echo isset($title) ? $title : 'Default' But it is returning 1 as if it were a...
asked by 13.09.2018 / 11:44
1
answer

Doubt with route

I've been trying to make a route for a while, but so far nothing ... Controller: public function profissionais(Request $request, $id){ $vinculo = session()->get('vinculo'); $profissionais = Vinculo::where('unidade_id', '=', $id)...
asked by 11.09.2018 / 21:25
1
answer

Error 500 after deploying Laravel application using MySQL on Google Cloud Platform

I have a Laravel application using MySQL 5.7: link In my local environment it works perfectly. I followed this tutorial , but the result is a 500 error. I also made a second attempt following YouTube's video and the same error is also...
asked by 12.09.2018 / 20:07
1
answer

Consulting in Eloquent

I have a script in laravel which in eloquent I need to put a condition in eloquent instead of selecting all as it is, I need to select it according to the id of the user. I checked that I should use Event :: find instead of Event: all (), but...
asked by 19.10.2018 / 19:34
1
answer

Problems with error handling - PHP Laravel

I'm doing an API and I'm having a little problem when I make error treatments .. To understand better I'll put the code below and then explain what happens. My route to calling my API: Route::get('lists', function () { h...
asked by 09.09.2018 / 15:37
1
answer

Print output from CRON at the terminal - Laravel

I created a CRON in Laravel and wanted to print information on the terminal where the command is running (Ubuntu terminal, in that case). What is the command for this in Laravel? Example: public function handle() { $digitalCertificat...
asked by 31.08.2018 / 17:29
2
answers

How to filter Combobox data using the Laravel Framework?

Context: Home I'm looking to load the Template Checklist templates in the combo, but only those that are not in the structure checklist database table. In this case, only the Catu model would be loaded, since it is not registered in the s...
asked by 19.09.2018 / 22:12
1
answer

Laravel Relationship in Datatable server side

Would there be any way to pass the model relationship to the columns of the Datatable server side? For example in the Datatable script: columns: [ { data: 'marca_id', name: 'marca_id' }, { data: 'automovel_modelo', name: 'automovel_...
asked by 19.09.2018 / 13:36
1
answer

Error executing script in Python3 (with Symfony / Process) on a Laravel Controller

I'm trying to run a Python3 script I've developed, which is located in a folder inside Laravel's app folder. One of the script is called by a Controller and the other by an Artisan Command. public static function searchAnswers($input) {...
asked by 18.09.2018 / 14:48