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
- 
		25 votes1 answer8303 viewsHow to sign a PDF digitally?I am developing a PHP system with the Laravel 5.1 framework that will generate some technical reports, and the client wants these reports to be digitally signed, IE, que conste la no PDF generated… 
- 
		15 votes2 answers1106 viewsUsing Laravel 4 with Microsoft SQL Server 2008I need to connect a database SQL Server 2008 in Laravel 4. I have been researching and I did not find solution for the scenario in which I am. I’m using Laravel using the XAMPP (PHP 5.5.6… 
- 
		13 votes2 answers641 viewsDoubts with relationships in EloquentGuys I’m making a belongsToMany to recover several Users that are related to a Item. It returns me in the all array Users correctly, but I need to make a hasOne of each User(created on the model… 
- 
		13 votes1 answer7485 viewsLaravel 5 and Sql ServerI need a help, I made several attempts to connect Laravel with SQL Server and all without success. However, I managed to make it work with pure php, using sqlsrv_connect and Code Igniter. Windows 10… 
- 
		13 votes1 answer1308 viewsWhat are the design standards for Serviceprovider and Servicecontainer used in Laravel and Symfony?In frameworks Laravel 4 ou 5 and Symfony, I realize that there are two classes that are essential for the operation of the whole system: Servicecontainer and Serviceprovider. It seems to be a way… 
- 
		10 votes2 answers15531 viewsHow to find the version of Laravel installed in my project?I was with the version of Laravel 4.2.7 installed on my computer. I missed two important methods in Illuminate\Database\Eloquent\Builder, which is the whereDoesntHave and the doesntHave. When… 
- 
		10 votes2 answers2727 views
- 
		10 votes1 answer13822 viewsWhat’s the simplest way to make an IS NULL with Eloquent?I saw tutorials on the internet that way you had to make a IS NULL is the following: Remessa::where('campo', 'IS', DB::raw('NULL'))->get(); But I was wondering about this, because if a ORM is… 
- 
		10 votes2 answers525 views
- 
		10 votes1 answer1326 viewsLaravel 5.3 - Events or Observers?I have some scenarios where I can use Observers to fire a notification, however, for me it would be indifferent to use Observer or create an Event, a Listener and then use this to fire a… php laravel pattern-design event-listener observer-patternasked 8 years, 12 months ago Fábio Jânio 3,407
- 
		10 votes1 answer2605 viewsWhat is Service Container?I was reading about Service Container in Laravel, however, I could not understand very well the purpose of this resource. I know that to create new services we have to use some Laravel methods:… 
- 
		10 votes1 answer4872 viewsHow to subtract dates in the Laravel?I need to calculate the working time on a call. For this I need to do operations with date, how do I do this in the laravel? Code: public function ticketsByUserSearch(Request $request) { $user = new… 
- 
		9 votes3 answers995 views
- 
		9 votes1 answer1165 viewsHow to avoid HTTP request overload when consuming REST API?I have a REST API made with Laravel and a Webapp (which uses the features of this API) made in Angular.JS. My Webapp is a unique portal for registered users, but now I’m creating a website so that… 
- 
		9 votes2 answers1707 viewsRoutes Laravel 5.3Good afternoon guys, I noticed that Laravel 5.3 has a new folder "Route", with the routes. By default it uses web.php I wonder, how can I create other routes without being inside the web.php, I… 
- 
		9 votes2 answers4636 viewsWhat is the csrf_token present in the Laravel layout file for?I am aware that to submit a form in Laravel, you must add a csrf_field, or declare that the route must ignore this protection. However, in the layout file there are the following occurrences:… 
- 
		9 votes1 answer167 viewsIs it wrong to use stab wounds in the Laravel view to present elements to the master user?I wonder if it is problematic to do this kind of validation in the views of Laravel. Example: Only a master user can delete certain record, so I present the delete button only if the user is master… 
- 
		9 votes1 answer443 viewsIs Laravel’s Blade a programming language?After a brief discussion of why the HTML is not a programming language, characterize that not because it is not able to perform calculations, make decisions, change information contained in some… 
- 
		8 votes2 answers650 viewsHow to use Packages in Laravel 4?I am new to the Laravel 4 framework. In Laravel 3 it was simple to use Bundles. In version 4 the use of the Bundles was removed and started to use Packages, but I didn’t understand how it is used,… 
- 
		8 votes5 answers1837 viewsHow to create a configuration file in Laravel 4?I would like to know how to create, import and use new configuration files in an Laravel 4 project. By that, I mean, project files and own settings. For example: I would like to create a file that… 
- 
		8 votes2 answers927 viewsHow to log only active users?In authentication beyond the data needed to log in the user, I want only those who are in status ativo = 1 log in, but I don’t know how to do this check. table user: id username email password ativo… 
- 
		8 votes1 answer1081 viewsURL::Previous() returns incomplete pathHow I’m studying the book Code Bright, from time to time there are some errors that I take a long time to resolve. However, I couldn’t find a solution in Google. By doing the Redirect::to() from one… 
- 
		8 votes3 answers4468 viewsBest(s) way(s) to use Dependency injection in LaravelWhat(s) is the (s) best(s) way(s) to use Dependency injection in the Expandable? The one I was using was this: public function __construct(Cliente $clientes, Telefone $telefones){ $this->clientes… 
- 
		8 votes2 answers476 viewsHow to change the method of an HTTP request in Laravel 4I need to perform CRUD operations in certain locations of my application that are contained within other Formulars. For this I will use AJAX to update the views containing the "sub-content'. I’m… 
- 
		8 votes2 answers217 viewsRisk in allowing developers to upem files. BladeI’m developing a blog platform where users submit their template and Laravel uses this template to build the blog. The user/developer will only inform where the values will be, example:… 
- 
		8 votes1 answer15493 viewsLaravel 5 - Remove public from URLI developed a form and need to "throw it" in production server. I have no server access (Linux, Slackware). I access my application from the url… 
- 
		8 votes1 answer1510 viewsIs there any way to test a route using PHP Unit in Laravel?I love to create using the PHPunit to create unit tests for my libraries. Always, before doing the git commit, run it to see if any changes affected what was previously working. I wish I could also… 
- 
		8 votes1 answer152 viewsLibrary for data validations in Brazilian Portuguese for LaravelWhenever I need to use cpf or telefone in Laravel, I need to use the method Validator::extend to add these validations. Validator::extend('cpf_real', function($attr, $value) { $c =… 
- 
		8 votes1 answer10928 viewsWhat’s the difference between @Yield and @include on Laravel?I’m learning Laravel 5.3, @yield and @include seem very much the same to me, the only difference I know is that @include injects the variables of father and may also include other variables. What’s… 
- 
		8 votes1 answer3930 viewsBest solution for three types of usersI’m starting to frameworks MVC with Laravel 5.3 I have 3 very different types of users, OperadoresDoSistema, AnunciantesDoPortal and ClientesCompradores, who can view the ad. Each one has his… 
- 
		7 votes2 answers744 viewsHow to create a Grouped List in Laravel 4 from an entity with self-relationshipI’m trying to create a select box com \Form::select() (grouped list) in Laravel 4 and I have the following entity: Items id = id do item nome = nome do item pai = fk dessa mesma entidade I already… 
- 
		7 votes2 answers2551 viewsProblem with @extends in view on Laravel.I have a problem with @extends('layouts.template'). Only my view that is as index that does not show the page, instead shows me only this @extends('layouts.template') on the page. What could be?… 
- 
		7 votes1 answer377 viewsHow to put an HTML code on a label in Laravel?When I try to do that: {{ Form::label("nomecampo", "Descrição<em>*</em>", array("class" => "entrada")) }} The tag enters inside the tag but is not interpreted correctly. See:… 
- 
		7 votes2 answers394 viewsGet inverse relationship with LaravelI am creating a forum system that is divided by sections. Each section contains categories, each category contains topics. Ex: Administração _ |_Regras da do fórum |_Sugestões e críticas… 
- 
		7 votes1 answer1589 viewsAutomate tasks with Laravel 5Good morning Personal. I need to create some tasks on my system that are executed automatically (such as a Cron Job). Example: Every day the system sends an email to system customers with the value… 
- 
		7 votes2 answers4496 viewsConsultations between tables with Eloquent - Laravel 5Good, I have the following problem when using Laravel 5 in the relationship of tables: I have these 4 tables (hypothetical names to illustrate the problem): Using the Laravel 5 models I connected… 
- 
		7 votes1 answer5068 viewsProject directory list in Laravel is displayed instead of running the applicationI would like your help to know why my PHP project with Laravel Framework does not work, I did all the steps correctly, but instead of seeing the framework, I am seeing your folders… 
- 
		7 votes1 answer1843 viewsMultiple schemas in Laravel 5 databaseGood afternoon guys, I am redoing a system and adopted the Laravel 5. In this system I have several schemas in the database and the solution I found was to work with a connection for each schema, as… 
- 
		7 votes1 answer892 viewsSort a search result with filterI have a search on the site and I can opt for several filters and it already works by returning and paging correctly. Example: /empresas?estado=2&tipo=3&page=2 The problem is when I click… laravelasked 9 years, 9 months ago Eduardo Cruz 81
- 
		7 votes1 answer6501 viewsSending email with Laravel 5.2I’m having trouble emailing with Laravel 5.2. You’re returning this mistake to me: Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required. The archive .env is… 
- 
		7 votes3 answers6007 viewsHow to Customize Password Recovery Email (Laravel 5.4)As I can customize the Laravel 5.4 password recovery email, I need to change the language but can’t find the place to edit. 
- 
		7 votes1 answer9661 viewshtmlspecialchars() expects Parameter 1 to be string, Object GivenI’m trying to make a button select in the Blade with @foreach to get the list of all Mysql databases. Only the @foreach works, I can get the values, but I’m not getting to put the bases inside a… 
- 
		7 votes1 answer8639 viewsPass parameter from one route to anotherI need to take a variable from the url and redirect with the parameter to another Function Route::get('doacao/{id}', function(Request $request){ return… 
- 
		7 votes2 answers1595 viewsORM (Eloquent) in Laravel 5.x VS Microservices architecture. How to develop web services using Eloquent that consume end-points of an API?Consider the following architecture: This is a very modern model where the API offers end-points for different services to transact with the database. I am a begginer user in Laravel, so my question… 
- 
		7 votes2 answers2154 viewsHow do I convert a date into American format in Angular?I’m using a Json No Laravel 5 response, where I use Angular to display this data. The date in Laravel is returned in format 2017-05-17 15:56:46. When trying to use filter date at the angle,… 
- 
		7 votes1 answer169 viewsBroadcasting with LaravelI’m creating a chat and for that I need to do a real-time mode so I don’t have to drip several times on the server SignalR who does this job, I’m working with Laravel-PHP and read the documentation… 
- 
		7 votes2 answers531 viewsCoding conflict using Tinker and LaravelI’m learning how to use Laravel and grabbed on to an encoding problem. I’m trying to use the Tinker to insert data into my tables, and there I’m getting the following error when I try to include a… 
- 
		7 votes2 answers990 viewsLaravel Restful Api - JSON errors instead of HTMLHow do I get the controller to automatically return a replay to the client in JSON format instead of HTML in case of an error (e. g. error 404, 500, 419, etc.). For example, if there is error 500 in… 
- 
		7 votes3 answers5954 viewsHow to upload to Laravel 5.7Controller <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Denuncia; use Illuminate\Support\Facades\DB; class AlunoController extends Controller { public function… 
- 
		7 votes2 answers969 viewsWhat is the usefulness of the service layer in the Laravel?What is the real usefulness of a service layer in the structure of Laravel? It’s just about separating the code from the Controller? How to use this layer correctly? My biggest question is whether…