I need to make a resource in an application using Laravel. When giving an Excel spreadsheet allow the user to choose which columns to save to the database. Example: I have a spreadsheet with 3 columns, but I just want to select (use some way to...
I'm trying to calculate the average sales value of a store, but I'm having some problems calculating the total value of each sale,
Controller:
$valor_total = PedidoProdutos::with('valor_por_pedido')->get();
Model:
use Illuminate\Data...
I have the following function and would like to use the following parameter method
public function graficos( Request $request ){
$id = $request->input('id');
$query = "SELECT * FROM tabela WHERE id = :id OR id = (SELECT...
Talk about it, I'm starting to use laravel and I have a problem when selecting some data.
I have the following tables: users , jobs , projects , job_user .
The table relationship of users and jobs is...
How do I count multiple records with Laravel?
Example:
Table homicios, count the columns mes, date, city separately and generate the graph in the chart.
Chart 1:
Jan - X amount
Feb - X amount
Etc
Chart 2:
City A - X amount
City Z - X quant...
I have 3 layers of entities, of which I only want the third object. but based on information from the first two.
For example, I have a factory that makes cars, and each car has a type of wheel. I want all the wheels manufactured by a factory....
I have the function in my controller:
public function pesquisa(Request $request)
{
if (! Gate::allows('celular')) {
return abort(401);
}
$marcas = CelularMarca::orderBy('nome', 'asc')->pluck('nome','...
What is the best way to develop notifications that work just like Facebook when someone has a post? I am using PHP & Laravel 5.5. Does anyone know or have seen this in Angular / VueJS / Javascript?
My method detach deletes all data from the student table (it removes the data from the membership table but deletes all data from another table)
$team = Team::find($id);
$team->students()->detach();
$team-&g...
I have the following search in my application:
$results = Profile::with('profileCategories.categories', 'informations')->where('ativo', '=', "1")->where('nome', 'like', '%' . $request->search . '%')->orWhere('sobre', 'like', '%...