Questions tagged as 'laravel'

1
answer

Send variable to Command from Controller Laravel

Today I call command through controler perfectly, but I'd like to send variables too. In controller , I call command like this: \Artisan::call('syncustomer:sav'); The name attribute of the current command: prote...
asked by 27.12.2016 / 15:38
2
answers

Is there a way to clear field formatting before going through validation? [duplicate]

I'm trying to look on the net as I solve this and it's taking a lot of time, it seems to be something simple but I'm breaking my head, so I decided to create a post here. I'm using Laravel 5.3 with MySQL in an environment provided by Larave...
asked by 20.12.2016 / 18:07
1
answer

Using the php artisan make: repository command

Hello, I would like to ask a question. I am using the command: php artisan make:repository ProjectNote And I would like to know how to make the command understand that I want my migrate to have the name create_table_project_notes And t...
asked by 06.05.2016 / 21:01
1
answer

How to customize the return of an attribute in Laravel?

In Laravel , I know that attributes can return an object of type Carbon\Carbon (an extension of DateTime of php), if the field is created_at or updated_at. Example: $usuario = Usuario::find(1); // Não é uma string, é um...
asked by 15.03.2016 / 15:43
2
answers

Display summary content in Laravel 5.1

I have a controller that performs a paged query: $noticias = Noticias::orderBy('created_at', 'desc')->paginate(4); However, one of the columns returned is content . The column in question has a lot of text, how do you do it in Laravel s...
asked by 09.03.2016 / 19:23
1
answer

How to join query string in Laravel 4 pagination?

How do I join query string in pagination of laravel 4? For example: I have a data listing and on this same screen I have a search filter. When I send a get to request the filter in the list by url http://localhost/lista-de-produtos?marca=...
asked by 01.12.2015 / 14:40
2
answers

Foreach with PHP StdClass

My page shows posts that have been registered to the database. Some posts have files that have been uploaded. These files are saved in server folders and the database has the table "Pivot_files" with columns ID, Post, Name and Size. $postagens...
asked by 23.11.2016 / 08:34
2
answers

I can not return the authenticated user in Laravel

Good morning In my project, I do the default authentication provided by Laravel 5, hence it directs to my home normally when I log in. I know I logged in normally because when I put wrong data it returns error. At this time I try to get the user...
asked by 02.02.2016 / 14:46
1
answer

SQLSTATE [42S02]: Base table or view not found: 1146 Table

I have this little problem with Laravel. The old and good, problem with the S that Laravel poe in the end. I've researched a lot of forums but the given solution does not work.    SQLSTATE [42S02]: Base table or view not found: 1146 Table   '...
asked by 26.01.2016 / 20:58
1
answer

Update in Laravel 5 a field receiving the value of another field from the same table

I have a configuration table in my database that has the following fields: ["id", "texto", "textoOriginal"] . Initially the values of the texto field are equal to the textoOriginal field, but the user can at any given time ch...
asked by 22.05.2015 / 23:12