Most voted "laravel" questions
Laravel is an open-source framework for developing web applications and services with PHP. Before asking consult the official documentation of Laravel.
Learn more…2,777 questions
Sort by count of
-
1
votes1
answer2555
viewsDifficulties creating update with Laravel 5.1?
I’m trying to create a update with Laravel 5.1 but is bringing the following error: Type error: Argument 1 passed to Illuminate\Database\Eloquent\Builder::update() must be of the type array, object…
-
1
votes1
answer599
viewsHow to check if an array has an attribute?
I’m using Laravel 5.4 in an application, and a validator method receives a array. That one array can have the attributes: [ 'nome' => $request->nome, 'ddd' => $request->ddd, 'fone' =>…
-
1
votes0
answers9
viewsHow do I use 2 mail drive in the Windows in Runtime?
A part of my application, I need to use Sendgrid to send dirty emails (marketing/welcome/forgot password etc...) and another part of my application I need to use Mailchimp (Campaigns) in the case…
laravelasked 6 years, 9 months ago TutiJapa Wada 666 -
1
votes0
answers32
viewsDeveloping an application with webservice how to approach
I’m conducting a project that consists of an online platform for managing a clinic, where it should contain a website and an application. My main idea is to create a Webservice to meet both platform…
-
1
votes1
answer258
viewsCors Laravel, release only for a specific domain
I’m using the library Laravelcors and would like to block all requisites except a specific Dominio, as I do this?…
-
1
votes1
answer43
viewsWhat is the correct order to inject dependencies into Laravel controllers?
I have noticed that sometimes, depending on the order I inject the dependencies, they don’t work... Is there any correct order?
-
1
votes1
answer905
viewsRegistration of users with CPF or CNPJ Laravel 5.5
How do I customize the user registration Laravel in the auth pattern using php artisan make:auth? I need the following clause It is mandatory to insert the field CPF or CNPJ. I found the…
-
1
votes2
answers658
viewsErrors with Put and Delete methods - Methodnotallowedhttpexception - Laravel and Angular
Hello, follow my fight with angular and Laravel. Now I’m having trouble with put and delete methods, I did nothing but what I had before in my code, I’m just adding more models - where I copy the…
-
1
votes1
answer152
viewsGrid with Laravel 5.3 searching for the Foreign Keys
Hello. I have an application where I need to mount a grid with all table data produtos. This table has Foreign Keys for two other tables, grupo and subgrupo. To mount my grid, I need the product…
-
1
votes1
answer7082
viewsOpen existing project Laravel
I need to open a project previously done in Aravel. I’ve never worked with Laravel, so I don’t know where I might be going wrong. the project came in a file . zip when I unpacked it created a folder…
laravel laravel-5 laravel-eloquent laravel-4 laravel-5.3asked 6 years, 8 months ago Cesar Vinicius 145 -
1
votes1
answer174
viewsCheck coincident times within an array
I’m working with a grouping of indefinite size of arrays, where each array (child) has another grouping of indefinite times (with initial and final times) for the execution of a given task, in the…
-
1
votes1
answer92
viewsMake inclusions of the respective user Laravel 5.5 Auth Standard
I have a simple question, I am setting up some registrations for the purpose of studying the framework Aravel, with People, Accounts and etc.. I am using Laravel’s default authentication, and now I…
-
1
votes1
answer47
viewsUse find field returned to add more results in the same query
In the code below I look for a product and take the field "related" it to make a search in the bank bringing all the products (including himself) that have the same value in this field. It is…
-
1
votes0
answers818
viewsAccents do not appear c/ PHP
I’m making a certificate system for an event and when words with accents are inserted, they leave. I am using Laravel and a library called Intervention Image to generate the images of the…
-
1
votes1
answer130
viewsError using Middleware on Laravel/Lumen
Personal talk I’m making the following mistake: ReflectionException Class Illuminate\Cookie\Middleware\EncryptCookies does not exist I’m using Lumen but I think I may have set something wrong in the…
-
1
votes1
answer1263
viewsWhat is the default value of MAIL_ENCRYPTION in Laravel 5.6?
My doubt boils down to the definition of MAIL_ENCRYPTION, in the archive .env we have MAIL_ENCRYPTION=null and inside the archive config\mail.php line 74 we have the stretch: 'encryption' =>…
laravelasked 6 years, 7 months ago Fábio Jânio 3,407 -
1
votes1
answer1359
viewsCorrect way to install Laravel on Linux
I’m starting on the Laravel Framework and I’m having some problems with the installation on Linux. I did the installation by Composer using the command php Composer.phar global require…
-
1
votes1
answer129
viewsOrganizing Laravel Migrations into a subfolder is bad practice?
I have created several Migrations that are related to each other, for having foreign keys and etc... but I don’t want to mix them with the Migrations related to auth, Permissions and etc. My…
-
1
votes0
answers39
viewsHelp in Laravel form
I need to put a value on this Form: {{Form::label('genre','Escolha a categoria') }} {{Form::select('genre',$options->getGenresClassificados(),null,['class'=>'form-control'])}}…
-
1
votes1
answer2921
viewsComments Block - Vscode
There is something that can facilitate the creation of comment blocks in this format: /* |-------------------------------------------------------------------------- | Register Controller…
-
1
votes1
answer6084
viewsConsume api with Laravel
I’m looking in the documentation of Laravel, in several places , but I haven’t had success yet I’m looking for somewhere that has a tutorial how to consume an api with Laravel!
-
1
votes1
answer43
viewsWhat is the real benefit of using Controller Resource in Laravel?
What is the real benefit of using Controller Resource in Laravel? It is possible to observe that the route file gets cleaner, since the controller methods are called based on the call routes and…
laravelasked 6 years, 7 months ago Fábio Jânio 3,407 -
1
votes1
answer76
viewsLoad dynamic content in navbar
I have a select in navbar with the cities registered in the bank. For this I am using ajax to load them. But I wanted a solution without having to use ajax, but also without having to assemble the…
-
1
votes1
answer170
viewsError installing Composer and Variable
I uninstalled and reinstalled a newer version of Vertrigo Server to have PHP 7, but when I try to do something with Laravel or Composer on CMD there appears a message saying: "the program cannot be…
-
1
votes1
answer50
viewsHelp with view
I need to show two categories in one view. I tried the way below, but without success: public function index() { return View::make('Titles.IndexFutebol')->withType('time1')->withType('time2');…
-
1
votes0
answers851
viewsDate comparison on Laravel?
I have a list of records and in this table I have a field data_limite: $planos = $this->plano->whereIn('id',$planos_id) ->orderBy('created_at','desc') ->get(); print($planos); I’m…
-
1
votes1
answer151
viewsHow to filter by method? Laravel 5.4
I need to filter all images that have a specific link, I was able to filter through the status of the product table, but what connects the image to the product is the method image(); class Produto:…
-
1
votes0
answers266
viewsChart.js error in Laravel?
Guys I’m trying to use Chart.js in Laravel through their own lib, but returns me the following error: Call to Undefined method Fx3costa Laravelchartjs Builder::size() I do not know what can be, I…
-
1
votes0
answers92
viewsProblems installing Laravel Homestead in Ubuntu
I just installed Ubuntu 16.10 and I’m having trouble installing Laravel Homestead. I’m with version 1.9.3 of Vagrant and 5.1.18 of Oracle virtual box. So far no problem, but when I try to run the…
-
1
votes3
answers1085
viewsCalculate difference between two dates - I cannot convert the database date to Datetime
Good afternoon! I made a function to calculate the difference of days between two dates, one of these dates is the current one (I create using the new DateTime()) and the other picks up in the…
-
1
votes1
answer1036
viewsUndefined variable: users
Undefined variable: users (View: C: Users Vitoria Desktop Laravel Resources views painel.blade.php) Panel.blade.php <!DOCTYPE html> <html lang="pt-br"> <head> <meta…
-
1
votes0
answers68
viewsHow to destroy all sessions of a user, save the current session?
How can I at once log out of all other sessions of a user, preserving only the current session? I aim to apply this behavior when resetting the user password. By default Laravel keeps old sessions…
laravelasked 6 years, 6 months ago Fábio Jânio 3,407 -
1
votes1
answer60
viewsViews and session variables available in sub domains
I am creating a web system in Windows where several sub-domains will be created to locate some services for users. Ex. panel.com, shop.dominio.com, etc. My question is: My variables created in the…
-
1
votes1
answer61
viewsRelationship Doubt - Laravel?
I’m new to Laravel and PHP and I’m trying to create a simple voting system. It turns out, I’m having doubts about how to relate between my tables. For example: I have the table of Pessoa and the…
-
1
votes0
answers18
viewsSend csfr_token from a client
I wonder if you have how to send a csrf_token from a client application to my webservice Or do I have to disable Laravel TOKEN check? If you can send it, how is it? That I want to test from Postman…
-
1
votes0
answers29
viewsNotification of system being duplicated
function Notifier() { switch (Url::getURL(2)) { case 'notifier': $render = 'dashboard/Notifier/notifier'; $model = 'notifier/Notifier'; break; case 'inbox': $render = 'dashboard/Notifier/inbox';…
-
1
votes1
answer963
viewsHow to check route parameters in Laravel and accepted only specific parameters?
I would like to know how to create a function that validates the parameter received from a route on Laravel, for example, have a route: Route::get('fotos/{user_id}'); where you can only access users…
-
1
votes0
answers37
viewsACL Adjustable by field
Is there any solution for access control by input? Example: a given user can access a form but cannot access a given field, another user can access the same form and have access to the field in…
-
1
votes1
answer39
viewsDate with zero Doctrine value
Good afternoon, I’m using the Doctrine In my project to control the bank. I am trying to enter a date but it does not return any value. If I use the $_POST I can see the value. Save function: public…
-
1
votes1
answer86
viewsAuth::loginUsingId does not work on Lumen
I’m trying to use the method Auth::loginUsingId in Lumen, but I get the following error : (1/1) Badmethodcallexception Method loginUsingId does not exist. in Macroable.php (line 74) at…
-
1
votes1
answer147
viewsLaravel user registration 5.4?
I am trying to register a user in the table and is returning the following error: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select count(*) as…
-
1
votes1
answer55
viewsLaravel date error
I’m trying to bring the values of the database and present on the screen though he gives me the following error message: ErrorException in helpers.php line 531: htmlentities() expects parameter 1 to…
-
1
votes1
answer622
viewsGet the login user id
How do I get the logged-in user id and insert it into the table along with Description and title? I imagine it’s pretty simple. public function saveCallRegister() { $title =…
-
1
votes1
answer28
viewsWhat is the best strategy to create a record and associate with another by means of a pivot table?
The section below takes the user’s session data, uses the method posts present in the model User to create a new post in the bank. Later I recover the id of the created record and associate this…
laravelasked 7 years, 6 months ago Fábio Jânio 3,407 -
1
votes2
answers374
viewsChange table color on Laravel Blade
Hello. I want to change the background of a table according to the type in DB. I am using Laravel 5.5. Can you help me?
-
1
votes2
answers498
viewsEloquent Laravel - Column user_id
Hi, I’m learning Portable and I didn’t find this on any forums. I have some tables that have a foreign key called 'user_id', but when I save an object in the bank I always have to fill this column.…
-
1
votes2
answers1252
viewsHow to remove duplicate query values in two tables?
I’m doing a query in two tables (students and users) and picking up the id, name and email values. Right after I do a Union between them. However, I wish there were no lines with duplicate values…
-
1
votes1
answer1925
viewsCall to a Member Function alterar() on null
Context: I am trying to update project data in edit mode, but this error is occurring. How to troubleshoot this problem? Mistakes: Class Projectocontroller.php: method updates <?php namespace…
-
1
votes0
answers66
viewsRequest data is coming null
Contextualization When deleting a record from the errata history occurs the error 404 that the object was not found; the object is coming empty. How to solve this problem? The requisition is coming…
-
1
votes1
answer195
viewsSave multiple images in a php loop
People I have the code below in Laravel that saves a single image and works correctly. But I would like to save multiple images that come from an input that is named:"name[]" Multiple. I think I…