Questions tagged as 'laravel'

1
answer

How to consult records between two related tables in laravel

I want to make the query of a section table and of it to show the data of another table that is related, called semesters. I need help on how to consult it in the controller and how to display the data in the view My controller public...
asked by 06.11.2017 / 21:30
1
answer

How to fix: 'Creating default object from empty value' in Laravel? [closed]

On the blade I have this code: @foreach <tr id="{{$employee->id}}"> <td class="visibleemployee"> <form action="{{route('admin.employees.cambiarVisible',$employee->id)}}"> <button type="button" id="buttonchangevisib...
asked by 30.10.2017 / 11:30
1
answer

How to enter a varibale in a name attribute in a form collective input?

I have a laravel blade form, using the input of the laravel collective form, for example: <div class="form-group col-xs-4"> {!!Form::label('Titulo de modalidad','Titulo de modalidad:')!!} {!!Form::text("cancion5","val...
asked by 20.10.2017 / 05:34
1
answer

How do I execute a procedure in laravel?

What kind of friends do I come to ask for your help, I am working on laravel 5.4 for some issues I have to execute a stored procedure that performs an insert and returns the id of the saved record, my question is how do I receive the id that ret...
asked by 20.10.2017 / 06:17
1
answer

save in public folder laravel

How can I save documents in the public_html folder on my server? I'm trying to save images but I can not get it, in my localhost it works fine, I attach my code: if($request->hasFile('img')){ $file = $request->fi...
asked by 08.10.2017 / 09:13
1
answer

Increase the value of a field

The code I have in the function is the following: DB::table('projects') ->where('order', DB::raw("(select 'order' from projects)")) ->order + 1; The error that shows me is the following:    Undefined property: Illuminate...
asked by 24.10.2017 / 16:45
2
answers

Error in dates in laravel 5.5 and SQLServer

Inserting any date in laravel 5.5 into a SQLserver database gives me the following error: SQLSTATE[22003]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server] Error de desbordamiento aritmético al convertir expression al tipo de datos datet...
asked by 24.10.2017 / 18:45
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