Questions tagged as 'laravel'

1
answer

Page loads normally, but with status 404 [closed]

Has anyone seen anything like this? link It is a project in laravel 5.7 hosted on the king host, the site is working normally on the local server, but on the web server it loads the page with status 404 and so I can not login or anythin...
asked by 08.11.2018 / 13:06
2
answers

Mistake laravel migrate

I'm having trouble running the command php artisan migrate in laravel, there was a monstrous error that I do not understand because it happened, I'll send the github link to you guys to take a look and give me feedback, in the file I show...
asked by 20.04.2018 / 16:48
1
answer

Simple question about Laravel and get () function

Hello, I have been using laravel for some time and I am familiar with the framework, but I would like to know the real need to use the get () method when calling a class. For example: Using get (): $pessoa = \App\Pessoas::where('ID_CD_TIPOP...
asked by 24.09.2018 / 16:57
1
answer

bank insert with relationship N: M [duplicate]

I need to insert users into my database the MySQL data already with the N:M relationship, but I do not know how to do that. Migrate: Schema::create('usuarios', function (Blueprint $table) { $table->increments('id'...
asked by 08.02.2018 / 15:44
1
answer

Divide sum and count result into the same Query?

The code below works, but I wanted to know how to do it all right in query , and if the way I'm setting it up is really the best way. $query = Avaliar::select(DB::raw('COUNT(id) as contar'), DB::raw('SUM(nota) as total')) ->where('...
asked by 19.12.2017 / 05:14
1
answer

Returning object item from an array

Well, I need to loop through an array and return an object's property from that item. My array has this format: Itriedtosolvethiswiththefollowingfunction:publicfunctionreturnObjectByDayAndTrip($links,$trip,$dayOperation){$newArray=array_f...
asked by 09.07.2018 / 15:08
1
answer

ORDERBY, ignore accents

I have a name column that belongs to the Producer_BVU model, whose names are: 2M1J A. Coelho ÓRBITA Bruno When I order: \App\Producer_BVU::orderBy('name', 'ASC')->get(); The output is: ÓRBITA 2M1J A. Coelho Bruno...
asked by 04.01.2018 / 10:50
1
answer

Keys in PHP Array

I have a good question, I was able to identify the problem, but I could not solve it .. hahahaha It is the following ... I have the following array: array:7 [▼ 1 => array:5 [▶] 2 => array:5 [▶] 4 => array:5 [▶] 10 => arr...
asked by 03.01.2018 / 13:56
1
answer

Put variable in session in Laravel

I am registering a name in a modal, sending to the controller and putting in the session. Returning to the view has nothing in the session. What am I doing wrong? Controller namespace App\Http\Controllers; use Illuminate\Http\Request; use...
asked by 31.08.2017 / 00:18
1
answer

Invalid handle returned - Laravel connection with SQL Server

I was developing an application with Laravel 5.5 with a Mysql database. Everything was working normally, however, now the database has been modified to SQL Server. When I run the test, it returns the error "Invalid handle returned." Searc...
asked by 21.09.2017 / 15:35