Questions tagged as 'laravel'

1
answer

How to identify route in Laravel?

I'm using a template for the menu and footer to be duplicated on all pages. I put if in the footer for when it is a certain route he change the content, but that is not what is happening, he is interpreting each and every route as "home"....
asked by 02.09.2014 / 18:53
1
answer

Error in an sql in laravel

I'm having trouble with a sql in the laravel where I make a join, but the error happens even in where , where deleted_at is equal to null , remembering deleted_at is timestamp . In the database is running sql, bu...
asked by 28.08.2014 / 15:30
2
answers

Problem with Seed Relationship between Category and Sub-Category in Laravel 4

I do not know how I do with my Seeds, I have 2 entities: Category and Subcategory. I want to be able to run seeds and be able to register my Categories and after my Subcategories, only Subcategory has a relationship with Category: needs id...
asked by 16.03.2014 / 18:01
1
answer

Return javascript result with controller

Is it possible inside a Controller, to return a javascript action and proceed with the controller script? Example: Call to Login page: <li><a href="javascript:" link="{{ route('login') }}" class="popup">logar</a></...
asked by 07.02.2014 / 15:07
1
answer

Eloquent select total query

I'm trying to group to bring totals into my query that is in mysql SELECT COUNT(*) as total ,e.descricao FROM pedido_cliente p INNER JOIN estabelecimentos e on e.id = p.estabelecimento_id GROUP BY p.estabelecimento_id,descricao...
asked by 07.12.2018 / 18:22
1
answer

How to return reregistered records between tables in laravel

I have 2 city and state tables I own the parana state and would like to know how to return all cities related to Parana state in a simple way without having to make a loop of repetition Type $estados = App/Estado::all(); $cidades = App/Cida...
asked by 20.11.2018 / 12:18
1
answer

Is there any way to generate migrations based on an existing Laravel database?

When I used Python's Django, I was surprised by the inspectdb command, which is able to generate the models based on an existing database. In Laravel, we have the migrations to be able to work with the database, and I find a clean and...
asked by 06.09.2018 / 15:03
2
answers

Ajax parameters are coming as undefined

I would like to say that I researched the forum and found some similar questions, but no answer solved my problem. Follow my question: Doubt: I'm trying to delete a notification by ajax, but the error is occurring. The variables project_...
asked by 23.05.2018 / 19:11
1
answer

How to do insert 1 to 1, with four tables in laravel

I'm working with a database already populated. It has four tables ( Aluno , clinico , Familia and TipoCompulsao ), where Aluno receives foreignkey from the three tables; Model student class Aluno extends...
asked by 06.11.2018 / 14:50
1
answer

Regex for repeated numbers in the CNPJ

I have the following regular expression: regex:/^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/ I can validate for this, but not for repeated numbers. I want to apply within this regex, a form that does not accept repeated values, for example:...
asked by 01.11.2018 / 14:11