Questions tagged as 'laravel'

1
answer

Laravel 5.5: WhereHas in relationship many to one

From what I understand in the documentation, where whereHas works, you need to have a get at the end of the query , however I need to use first , since I'm getting information from a particular record. The way the code is, it does not disp...
asked by 20.12.2017 / 13:15
1
answer

Help with a simple join

Good night, I do not know what I'm doing wrong, I have two models, in the migration I created it so Schema::create('endereco_tipos', function (Blueprint $table) { $table->increments('id'); $table->string('nome');...
asked by 13.09.2017 / 06:20
1
answer

Form Value does not return in Collective laravel

The form in the edit part does not display the value coming from the database. All other form fields are returning the value I get in the database. Here's how I'm doing: <div class="col-md-3"> {!! Form::label('departamento','Depart...
asked by 18.08.2017 / 23:33
1
answer

How to load modal edit dynamically using Laravel?

In an application I'm doing the following to load my Bootstrap Modals index.blade.php obs: data-target (#edit {{$ ecategory-> id}}) used to call modal @foreach($ecategories as $ecategory) //listando os registros <tr class="danger"&g...
asked by 26.09.2017 / 20:52
1
answer

Error creating vagrant box laravel / homestead: TCP connection reset by peer

So I'm setting up a PHP development environment and I came across this TCP connection reset by peer error, I have no clue what's going on. The virtualbox has been installed perfectly. I use Fedora 26 if it matters. print the terminal:...
asked by 26.09.2017 / 15:35
1
answer

Error sending files to server aws s3 in Laravel

I'm trying to upload a file to Amazon's s3 server, I followed the Laravel 5.4 documentation that talks about FileSystems. But it returns the error: Error executing "ListObjects" on "https://s3.amazonaws.com/comercio-urbano?prefix=myfile.txt%2F...
asked by 04.04.2017 / 16:00
1
answer

Protecting a route used by a single domain

I have a Laravel application hosted in a subdomain and need to allow its API (which has a single POST route) to be used only by the application hosted in the main domain. What is the simplest way to protect this route? I thought about using J...
asked by 31.10.2017 / 11:12
2
answers

Open a certain tab by clicking the navbar link

I have a navbar that has several links to the same page that has 3 tabs. I need to click on a navbar item it opens the page with the specific tab selected. Itriedtodothis(butitdidnotwork): $("#menu").click(function(){ $("#dados-capa")....
asked by 31.10.2017 / 17:37
1
answer

Is there a naming pattern for table index names in Mysql?

This question seems simple, but wanted to know how to set a pattern. Normally using the Mysql Workbench a default is automatically set, as in the example below: fk_tabela1_tabela2_idx Note: I'm using Laravel which has nomenclature standar...
asked by 22.08.2017 / 18:38
2
answers

Relationship with 3 tables in laravel

I'm trying to make the relationship between 3 tables in laravel. With 2 tables I got it, thanks to the help of the forum, but I can not make it work with 3 tables. the relationship is as follows: I have 3 tables: News, Photos and Unit (school...
asked by 10.08.2017 / 13:03