Questions tagged as 'laravel-5'

2
answers

validate if a record exists before inserting laravel 5.5

I am trying to make an insert in a table with a many-to-many relationship. My doubt is if there is any way to validate, if that relationship exists do not add it again this is the code that I use but I do not know if eloquent already brings some...
asked by 18.10.2017 / 23:35
2
answers

How to call my UPDATE route through the action of the form in laravel?

I'm trying to call the update path using the form's action and it does not send me any errors, but even then in the database my registry does not update. I'm using laravel's Route :: resource. This is my form: //Aqui quiero llamar la funci...
asked by 17.10.2017 / 18:23
2
answers

Laravel views loaded with Ajax do not run external js files created with webpack

The problem is this, I have a form and I use ajax to bring me a specific section of it by means of a select field, I use views created with Laravel. ajax: $(function(){ function showPlanningFormProduct(){ var value = this.valu...
asked by 13.12.2017 / 03:47
1
answer

Compound primary key: Illegal offset type error in laravel 5

I am new to Laravel and I do not know how to solve this problem, which is as follows: I have a table like that on MySql: Table: propiedad_x_tipo Columns: **id_tipo_propiedad** int(11) **PK** **id_propiedad** int(11) **PK** As you can se...
asked by 22.09.2017 / 01:41
1
answer

Is it possible to validate with the operator Or a FormRequest in laravel?

I have a form in which I show fines and consumptions, and a button that sends the selected elements. The question is whether you can make the FormRequest validate that one of the two is sent. return [ 'consumos'=>'required',...
asked by 29.08.2017 / 07:36
2
answers

Send data to a Laravel driver with AJAX

I am developing a web platform for an IPS with Laravel 5.4 and PostgreSQL 9.6 . The problem I have is the following: in the patient registration form, I would like to see the application by means of Ajax in the database when losing the focu...
asked by 28.08.2017 / 03:47
1
answer

Error paging in laravel 5.4

I have an error when paging the data, just load the first page and then give me a MethodNotAllowedHttpException . I've been spinning around and I can not solve it. Route: Route::post('estados/resultado','consultasController@searchestado...
asked by 15.08.2017 / 08:11
1
answer

Alias for consultation in two tables with laravel

Is there an abbreviated way to identify the columns of each table by creating the query in this way? $product = Product::with(['order'])->where('user_id','=',\Auth::user()->id)->find($id); For example, specifying something like thi...
asked by 06.08.2017 / 06:24
1
answer

Problems with laravel routes

I have problems with laravel routes I can not access the destroy method and if the routes are defined I leave the code and some screenshots Listing <table id="example1" class="table table-bordered table-striped text-center">...
asked by 17.08.2017 / 21:06
1
answer

Use different table name to users for login and registration

I would like to use a table name different from users that comes by default in laravel. How could I use a different table name for the login and register that will have some more columns. That same table will make the login and registratio...
asked by 07.08.2017 / 16:26