Most voted "laravel-5" questions
Laravel is an open-source framework for developing web applications and services with PHP. Use this tag for specific questions about Laravel 5 or later.
Learn more…751 questions
Sort by count of
-
1
votes4
answers297
viewsAbout Routes and Links
I crud it, but I changed the organization of the files, instead of following the pattern, I created a user folder that contains the controller, route and model. I would like the help to try to…
-
1
votes1
answer344
viewsDifficulties in Route Creation and Laravel Controller 5.1
I created a CRUD with Modal is working all right but I created request form data display, queries with BD all within Routes, I do not think very cool would like to pass these features to the…
-
1
votes1
answer657
viewsCreate Postgres "Numeric" Field in Laravel 5.1
I need to create a field like Numeric existing in postgres using migrations from the Laravel, can anyone tell me how I do? I tried that, but it didn’t roll: public function up() {…
-
1
votes1
answer388
viewsPick up zip in another bank in Laravel 5
I’m doing a registration system using the Laravel 5, I created the client scheme, with some tables such as person, address, email, phone. happens I have another bank, called cep, where has some…
-
1
votes1
answer51
viewsLaravel - I make a @list action for each Controller or a 'listController' Controller receiving parameters?
I have an administrative panel with several areas your item listings from each own table. What’s best to do: A action 'list' for each Controller responsible for each area: class aController extends…
-
1
votes1
answer59
viewsHow to count underage employees?
I use the code below to display the number of active employees: {{ $relatorio->Empresa->Funcionario->where('id_status', 1)->count() }} How do I count only employees under the age of 18?…
-
1
votes1
answer241
viewsIs there any way to define a specific title on Laravel routes?
In the Laravel 5, I am creating a menu dynamically, making a foreach in the list of registered routes. So I can have a menu displayed each time a new route is created, but I’m only listing the ones…
-
1
votes1
answer155
viewsIgnore error validation in Netbeans file directory
I am creating an Laravel application and I like to use Netbeans for it. The problem is that Laravel has a number of libraries that it implements itself and that use testing resources that make my…
-
1
votes2
answers200
viewsHow to send email without a view
All tutorials I think about, including the official documentation show how to send emails using views. How to send emails without any view? As a system routine automatically?
-
1
votes1
answer326
viewsCalling method within URL in Laravel
I have a page with a "back" link. Is there any way to call the method back() of Laravel within the href of the link? That code doesn’t work, but I want something like href="{{URL::to(back())}}"…
laravel-5asked 8 years, 4 months ago Amanda Lima 3,428 -
1
votes1
answer169
viewsDynamically Set Connection in Model Laravel 5.1
I saw that I can use different connections for my models by defining as follows: class Aparelho extends Model { protected $connection = 'minha_conexao'; protected $table = 'aparelhos'; } But how can…
-
1
votes0
answers616
viewsSlow PDF creation - DOMPDF Laravel5
I am currently using the Barryvdh Dompdf to create reports in a system made with Laravel 5.1, but it is very slow because of the size of the reports, so that, for many times (almost always), it ends…
-
1
votes3
answers1065
viewsMultiplo INSERT Models Laravel 5
I am developing a system and came across the following situation: I need to enter the data first in the 'person' table, retrieve the last 'id_person' and then insert the data in the 'provider' table…
-
1
votes0
answers107
viewsValidation "in" Laravel 5
Good afternoon, I need to validate a Dropdown so that if it exists the values 1, 2, 3 the user can not enter other values other than those contained in it. I managed to do in Alunoupdaterequest the…
laravel-5asked 8 years, 6 months ago Samuel Corrêa Dos Santos 31 -
1
votes1
answer1578
viewsLaravel - Save data in the database only if it does not exist and....
I have a person registration system and there is an area with several checkbox fields that represent the social group that the current person represents: TABLES person id | nome 1 | João 2 | Maria 3…
-
1
votes1
answer529
viewsLaravel Email Sending Configuration 5.1
I need to implement a configuration screen, where the user can set the data to send email as: MAIL_DRIVER, MAIL_HOST, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD, MAIL_ENCRYPTION, etc. In this case the…
-
1
votes2
answers499
viewsApi Restful Lockable 5.2
Hello, I am trying to create an api in Laravel 5.2 what I’m trying to do is this: 1 - continue using default auth system for web user. 2 - create an api for users of an application. I am using the…
-
1
votes1
answer465
viewsLaravel 5.2 - validation rule does not work
I need to do a validation of a zip code field, but the following attempts do not work: $rules= ['cep' => 'required|numeric|size:8']; ou $rules= ['cep' => 'required|numeric|min:8']; ou $rules=…
-
1
votes1
answer55
viewsError mounting Foreach Laravel 5.1
I’m trying to set up a filter where I search some options BD I made a foreach to bring this data from BD but is bringing an error: Trying to get property of non-object Follow my code: Controller…
-
1
votes1
answer164
viewsSearch in mysql by Javascript
Good morning, I’m trying to make a check if the typed Cpf already exists in the bank, I’m using Portable, could someone help me in this function please? In my controller I search and list all the…
-
1
votes1
answer93
viewsProblem returning data in view with Laravel 5
I’m trying to bring data to a view and I’m not succeeding. I have my class of Person. class Pessoa extends Model { public function telefones() { return $this->hasMany(Telefone::class); } and in…
laravel-5asked 8 years, 5 months ago André Martins 1,481 -
1
votes1
answer242
viewsLaravelexcel is converting the header values of an excel sheet. How to disable this?
I am using the Laravelexcel library to import data from an excel to a database. To get the header data from my spreadsheet, I do the following: Excel::load('file.xls', function($reader) {…
-
1
votes1
answer743
viewsLaravel x Cakephp
I’m starting at Laravel (5.x), but I’ve had years of Cakephp experience and I’d like to clear up some doubts, because I haven’t found anything like this on the Internet: 1) Can I only create models,…
-
1
votes2
answers613
viewsHow to return a collection of objects via ajax?
I created this function in my Controller to return a list of employees in my ajax request, but it is not returning anything. public function getFuncionarios(Request $request){ if($info =…
-
1
votes0
answers45
viewsGroupby making query get very slow
Good afternoon guys, I’m making a query in the bank where everything goes well, however when I use the "groupby" this query is very slow, very slow even, example, just take the line of the groupby…
-
1
votes1
answer160
viewsWhat is the best way to query a user’s data in Laravel?
When presenting multiple user data in a view, it is more advisable to do it in what way? Option 1 (pass data to view): $usuario = Auth::user(); return view('painel.usuarios.perfil',…
-
1
votes1
answer1133
viewsSetting a middleware for a controller, except a function in Laravel 5
I’m starting to work now with Laravel and realized that setting the routes directly to the controls where I can set the type of HTTP request is more feasible for my application. Today I have…
-
1
votes1
answer380
viewsAuthenticate in a database and change information in others
So, I need to create an application with Laravel 5 where it is possible for different users to be authenticated in a specific database where the system is. After logging in, each user can change…
-
1
votes1
answer226
viewsCheck which Guard is logged
I have a 5.2 Standard application, with multiauthentication, the Guards configured in config/auth.php sane: ... 'admin' => [ 'driver' => 'session', 'provider' => 'admin', ], 'user' => […
-
1
votes3
answers1420
viewsHow to get only the month of a date with Laravel 5.3?
I need to take just the month of a date that comes by a $request. But I don’t know how to do it: if ($request->parcelas > 1) { $mes = $request->data_vencimento = date('m'); for($i = 0; $i…
-
1
votes0
answers374
viewsLaravel Checkbox Recording/Editing 5.2
Hello, I’m developing a Course Registration in Laravel 5.2. I created CRUD perfectly, it creates, edits and deletes everything right, but in this register has 3 items that are of type CHECKBOX, I…
-
1
votes1
answer508
viewsShow Json data inside an Html Form
I have a Grid with the edit button when I click on it it accesses the Controller and brings the data in a Json and "Theoretically" was to return this data in a Modal. When I type Url .... show/(ID)…
-
1
votes1
answer212
viewsCreating the bank with Migration Adjustable
I know with migration I can create the tables, but it has some form of automates even the creation of the bank with the migration to follow as basis I use the Laravel 5.2…
-
1
votes1
answer1487
viewsReturn select field value in Laravel
How do I return the value that is in the database of a select field and continue showing the other options to edit: <div class="form-group"> <label>Tipo de imóvel</label>…
-
1
votes1
answer182
viewsCombobox with yes and no on the Laravel
I have a combobox that has the values yes and no. He is bringing the value not put in the bank but the edit form does not appear the other option that in the case would be yes. How do I make the…
-
1
votes1
answer299
viewsProblems with routes in the Laravel
I’m working with group routes in the laravel 5.2 and I’m having trouble with the create.store part of the route that saves my object. My files are structured as follows: Clientecontroller.php…
laravel-5asked 8 years, 3 months ago Renan Rodrigues 3,709 -
1
votes1
answer24
viewsProblems writing to an input from the controller
Hello, I’m having trouble entering data from controller. I am doing the activities of a Code House Laravel book to learn and needed to do this to update the record of a bank tuple, I ended up using…
-
1
votes1
answer523
viewsProblem with model Aravel 5.2
Well I’m having a problem with my model, I don’t really know what’s going on, I’m creating a packaging CRUD where I add everything dynamically with the requests in the signature of the function.…
-
1
votes1
answer201
viewsHow to use Artisan make:Migration in a subdirectory with Laravel 5
I am starting to build an extremely robust application using Laravel 5 and need to organize all my table migration codes. My solution was to structure subfolders to facilitate the understanding and…
-
1
votes0
answers87
viewsRun a Migration by passing parameters on Laravel 5
I am creating a robust application where I will define which commands will be executed within a database according to the subdomain (which is also the name of the client’s database). How can I pass…
-
1
votes1
answer7692
viewsLaravel request validation
Well I’m having problems with validations on laravel, in real it is validating correctly but need to inform the user which field X is required or not. Today the system simply sends to same screen…
-
1
votes1
answer181
viewsHow to insert multiple rows of a single query using the same ID
I’m trying to make multiple Inserts using the same ID with the Laravel but it is doing only 1 Insert. The idea would be something like this. ped_cod|est_cod|ped_qtde 8 |2 |9 8 |3 |2 8 |4 |2 8 |9 |15…
-
1
votes2
answers73
viewsBug change position of banners site Laravel
I’m developing a website where it has a banner modal and I want to define a field in the database of type "order", where I can define which banner appears in first, second, third ... on my admin…
php database laravel laravel-5 laravel-eloquentasked 8 years, 2 months ago Danilo Tiago Thai Santos 409 -
1
votes1
answer58
viewsProblems with the return of the hasMany relational
I am working on the Batch table of my project where each batch will have its own product and each product may have multiple batches. I set up the whole relationship and now I’m testing access by…
laravel-5asked 8 years, 2 months ago Renan Rodrigues 3,709 -
1
votes1
answer940
viewsAjax request for server
My minimum is the following, I am developing an API for a bakery, where it may be on the same server or different server, I am using the framework laravel in the version 5.2.*. In order to…
-
1
votes1
answer1184
viewsRelationship of Laravel Tables
I have a bank with the following relationships: I’d like to bring the relationship of Menu as per the Perfil of the user. In tiker I do the following steps: $user = App\Models\User::find(1); $perfil…
-
1
votes2
answers493
viewsSpecify columns in a relationship with Laravel
I have a relationship of User with Role. User::with('role')->get() In the case, User has the columns: id, name, role_id, created_at and updated_at. And Role has: id, name, slug, created_at,…
-
1
votes1
answer173
viewsMigration in several tables with the same prefix
Is it possible with the Laravel to generate a migration that changes several tables with the same prefix? for example: in the tables pesquisas_187 and pesquisas_146 (tables that have the same…
-
1
votes0
answers35
viewsContent size of a variable from a request
I have a web application developed in Laravel 5.0, which receives a request via POST from another application. The data sent is a JSON with a relatively large amount of information, and when I get…
-
1
votes0
answers121
viewsJSON request comes full page
I have problems with the requisição JSON, she’s returning the html of the full page being that my request is of a JSON. I’m using framework Laravel in versão 5.2 I make my request like this: $curl =…