Questions tagged as 'laravel-5'

1
answer

syntax error, unexpected end of file laravel

Well my query is because I read my code a thousand times and I do not know where the error is, I have a pure php app that I'm trying to integrate with laravel but I can not find the error of syntax error, unexpected end of file create...
asked by 09.07.2018 / 02:34
1
answer

About-Writing data

I'm filling an html table with data that throws me a query with ajax. The call is initialized by a select depending on the selected data: <select name="verListaDe" class="navbar-form navbar-left"> <option id="all" value="1"&...
asked by 09.07.2018 / 16:27
1
answer

Search for a row using a substring

You see, I have a table Game with the variable nombre , which obviously is a string of characters. Well, I have created a form to search for a row using a substring: @extends('layouts.app') @section('content') <div class="conta...
asked by 18.07.2018 / 11:50
1
answer

PivotTable with additional field Eloquent Laravel 5.6 Mass Assigment Protection

when using pivot tables with additional fields, it does not allow me to create the record since I must declare it as fillable ... how could I declare the additional field as fillable? Suppose we have the Student table and the Course table and...
asked by 16.06.2018 / 22:50
1
answer

How to insert an intermediate table in laravel?

having the following tables-migrations in laravel: Table person Schema::create('personas', function (Blueprint $table) { $table->increments('id'); $table->string("nombre"); $table->string("apellidom")->nullable();...
asked by 16.09.2018 / 11:00
1
answer

How to get data from table roles the views through the Auth methods in laravel?

I have this relationship: In User.php: public function roles() { return $this ->belongsToMany('App\Role') ->withTimestamps(); } in Role.php public function users(){ return $this ->belongsToMany('App\User')...
asked by 26.05.2018 / 04:26
1
answer

How can I perform the following query with Query Builder Laravel 5.5

I have the following query in mysql. SELECT COUNT(*) FROM (select SUM(tabla1.campo1) from 'tabla1' inner join 'tabla2' on 'tabla1'.'tabla1_id' = 'tabla2'.'tabla2_id' where 'tabla1'.'campo1' <> 0 group by LOWER(tabla1.campo2)) tabla_gen...
asked by 24.05.2018 / 16:42
2
answers

Primary codes in Laravel

You see, I have a language table with the following values: Schema::create('idiomas', function (Blueprint $table) { $table->increments('id'); $table->string('idioma'); $table->string('nivel_hablado'); $...
asked by 06.05.2018 / 10:35
2
answers

Obtain data from a controller in Laravel in Vue Js and interact with them.

I'm trying to bring data from a Laravel driver to Vue JS. data() { return { article: undefined } }, created() { this.$http.get('article/' + this.$route.params.id + '/edit?include=category,tags') .then((r...
asked by 15.05.2018 / 07:33
1
answer

Method Illuminate \ Database \ Eloquent \ Collection :: whereHas does not exist

You see, I have to start a table Sector : Schema::create('sectors', function (Blueprint $table){ $table->increments('id'); $table->string('nombre'); $table->timestamps(); }); This table is used in a ta...
asked by 07.05.2018 / 12:43