Questions tagged as 'laravel'

1
answer

Why do not relations work for me in Laravel 5.4.2?

Hello friends, my problem is the following, for some days now I have been planning the relations of the game that I am doing with PHP using Laravel 5.4 and the following problem arises when creating users: I have two Tables: users and charact...
asked by 14.08.2017 / 17:23
1
answer

Driver laravel does not update

I have a problem when I try to update the information, when I press the btn to edit the information, I load a view with the text fields that get information from the table, but when I edit them and try to submit, the request errors, for example...
asked by 19.04.2017 / 10:15
1
answer

show the last data db laravel

Hi I have this problem with laravel this is my code $last = DB::table('nombre_votos')->select('id') ->orderby('created_at','DESC')->first(); return view('user/votos/index',compact('last')); The idea is to show...
asked by 05.10.2018 / 21:54
1
answer

Fill a select in Laravel

I have a problem trying to fill a select with data from the database, with laravel 5.6 In my controller I have the following code: public function index() { $roles=roleUser::pluck('id_role','nombre'); return view('auth.register',co...
asked by 04.05.2018 / 03:27
1
answer

Edit record in laravel 5.3

I am developing an application that performs a series of questions that are organized into categories, there are 2 questions by category, after the second question of the category is done, it averages the score between the two and saves it in th...
asked by 06.11.2016 / 15:35
1
answer

Laravel primary key

How can I change the primary key in laravel by default? <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddSubcategorias extends Migration { publi...
asked by 01.06.2017 / 01:23
1
answer

Laravel Builder could not be converted to string

I try to update two tables Meter and Order Installation , edit method receives the ID of the installation order, which is supposed to get the meter number, actually if I do dd ($ idmeter); the number is shown, but when I try to get the Met...
asked by 25.05.2017 / 01:01
1
answer

Problem login validation messages Default LARAVEL 5.2

I am trying to make a custom login module based on the default login (Route :: auth ()), but somehow, the messages corresponding to a 'required' validation rules appear, in both fields, email and password, the problem is that I do not know where...
asked by 09.06.2016 / 19:51
1
answer

Help in laravel 5 and ajax. Get a value from the database

I want that in my view, when selecting something in my dropdown, I execute a method that I have in my controller, it performs another function (query) in my model, which takes a data (int) from a table . I have an error when debugging with chrom...
asked by 10.06.2016 / 20:10
2
answers

Undefined variable in a single view of laravel

good I find myself doing a library application in laravel at the time of making an individual view of the database using the driver show function I do it in the following way public function show($id) { $libros = Libro::find($id); if (...
asked by 14.02.2017 / 02:52