Questions tagged as 'laravel'

1
answer

How do I send two parameters via url? php

Hi, I'm using laravel, I'd like to know how I can send two parameters per url .. Route: Route::get('detalle/{subcategoria}/{codigo}', [ 'as' => 'detalle', 'uses' => 'principalController@cargarDetalle', ]); Url: <a href...
asked by 19.12.2017 / 14:59
1
answer

Select Rand () between From GroupBy and with OrderBy

I have a table with the following fields: id code category web_sales brand I want to show only random code in Laravel and group it by category but that the code is generated randomly. The problem is this: how do I group the cat...
asked by 19.12.2017 / 02:42
1
answer

ErrorException array_merge (): Argument # 2 is not an array (View: C: \ wamp64 \ www \ MYPROJECT \ resources \ views \ news \ index.blade.php)

I'm trying to show the elements of a database in Laravel and I get this error ErrorException array_merge(): Argument #2 is not an array (View: C:\wamp64\www\MYPROJECT\resources\views\news\index.blade.php) I did not find services.json...
asked by 21.12.2017 / 13:16
1
answer

Load username PrimaryKey in url?

Good evening. I have a simple question, I am trying to list a list of variables from a MYSQL bd using its first and key. So far so easy, the complicated thing is that my route is like this projectName.com/primaryKey But I want it to b...
asked by 21.12.2017 / 02:24
1
answer

Can you explain differences between eloquent and \ DB :: in Laravel?

I just started with Laravel and I have several problems ... the fact is that I was using the \ DB :: Like this for example that you already know: $macUsuario=\DB::table($this->tablaMac) ->join($this->tablaUsuario, $...
asked by 11.12.2017 / 20:34
1
answer

Do not load resources - Laravel 5.4

Good morning. It turns out that I have a project in Laravel 5.4 which already works correctly if I run it both on my computer and in the local network. The problem arises when I try to run from another network (for example, from my cell phone) a...
asked by 15.12.2017 / 15:55
2
answers

Problem Laravel Routes with Ajax

I am using Laravel 5.4, I have three forms (Create - Edit - Clone) and in the 3 I need to execute the following Ajax request, for this reason the url of each form varies: http://app.dev/users/datasheet/create http://app.dev/users/datasheet/6/e...
asked by 22.12.2017 / 07:16
1
answer

Relationships without id in Laravel

Good morning. I would like to relate two tables in Laravel, from the models, without using the id field. That is, I have a table with a common field, which is not an ID. And I would like to relate them. table 1 field 1 field 2 field a - &g...
asked by 21.12.2017 / 18:30
2
answers

Delete in Laravel 5 MethodNotAllowedHttpException '

I'm trying to delete a post in Laravel and I get Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException So I have my delete button <div class="col-md-6 text-right"> <form method="DELETE" action=...
asked by 21.12.2017 / 22:07
1
answer

Store logeado username?

I am trying to store the name of the user who updates data in a table, I have only managed to store the name of the person who saves data for the first time, but not who update, another question is; I can save only the name, not the ID, so as no...
asked by 07.12.2017 / 17:19