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
- 
		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… 
- 
		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… 
- 
		10 votes2 answers2727 views
- 
		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… 
- 
		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 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 votes2 answers6589 viewsWhat is the file . env in Laravel 5?What’s the file for .env? In the app.php has env => env('APP_ENV','production'). What would that be Production? What other string can go there? And the var APP_ENV? What does it mean?… 
- 
		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 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 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 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 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 votes1 answer4876 viewsCustomizing a user model Laravel 5.4 - Login problemI tried everything already, but I can’t solve a problem in the login system Laravel which is this: I created a model called Usuarios, I put all the information in it that has to be properly placed,… 
- 
		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… 
- 
		6 votes1 answer878 viewsCustomized authentication with CPF and E-MAILI’m thinking of a way to authenticate users using the email and the CPF of the same, so far not found a way to do, someone has a suggestion? public function auth(Request $request) { $credenciais =… 
- 
		6 votes1 answer1202 viewsHow can I differentiate authentications in the Standard? Example: Administrator and Common User without using multauthHow can I differentiate routes for the same auth? I have a User table and in it I have registered two types of user: admin and common user, both in the User table, with the same attributes. How can… 
- 
		5 votes1 answer937 viewsDeleting local image of Laravel productWell I have a product and I have an image being recorded locally. I need that in the backend when the product is deleted the local image is deleted. When I delete deletes the database data deletes… 
- 
		5 votes2 answers545 viewsProblem accessing a One to Many interface in LaravelMy Product model has the following relationship: public function categoria(){ return $this->belongsTo('estoque\Categoria'); } and my Category model has: public function produtos(){ return… 
- 
		5 votes1 answer1028 viewsDifference between new project command and create-project commandWhat is the difference between commands laravel new nome-projeto and composer create-project laravel/laravel nome-projeto --prefer-dist? In both cases the result is the same but in the case of via… 
- 
		5 votes1 answer1303 viewsAuthentication Laravel 5.2I am trying to log in to Laravel 5.2 but it is not authenticating the user in the table. in the archive auth.php I changed the validation table to login: 'guards' => [ 'web' => [ 'driver'… 
- 
		5 votes0 answers8377 viewsLaravel 5 - Timezone Wrong TimeI switched the Timezone 'timezone' => 'America/Sao_Paulo', but not getting the GMT +3, which is the one in Brasilia. You have to trade something else somewhere else, off app.php?… 
- 
		5 votes2 answers228 viewsWhat’s wrong? BD + LaravelI have a form in Lade taking the values of the database. In it I have a field date not required to be filled in. When you enter an empty date the results screen displays the date "01/01/1970". How… 
- 
		5 votes1 answer1374 viewsCreate Unique constraint with two fields in the Laravel requestI have in the creation Migration of my table the following: public function up() { Schema::connection('database2')->create('empresa_funcoes', function(Blueprint $table) {… 
- 
		5 votes3 answers245 viewsError doing Join with Laravel Query BuilderI’m doing the following Join: public function getStockDanger() { $data = DB::table('product') ->join('stock', 'product.id', '=', 'stock.product_id') ->where('stock.stock', '<=', 0)… 
- 
		5 votes2 answers1012 viewsConsultation with Eloquent do LaravelI have this consultation: select Q.id,Q.questao, D.disciplina, S.serie, S.ensino from questoes as Q left join capitulos_questoes as CQ on CQ.questoes_id = Q.id left join modulos_questoes as MQ on… 
- 
		5 votes2 answers781 viewsCreate profiles in applicationI need to modify my application so that each user sees its particular content, because each user will have information of its own. I’ve set up the default authentication using make auth and it’s… 
- 
		5 votes3 answers436 viewsHow to order the query in the same order as an array used in Wherein?I would like Laravel to return me a list of products where the ID belongs to this array: [12,5,1,8,16], but sort by id as per array order!* What I have so far: $produtos = Produto::whereIn('id',… 
- 
		5 votes1 answer4227 viewsVariable validation required if'tipo' => 'required', 'cpf' => 'required_if:tipo,F|cpf', 'rg' => 'required_if:tipo,F', 'cnpj' => 'required_if:tipo,J|cnpj', 'inscricao_estadual'=> 'required_if:tipo,J', Next, I’m… 
- 
		5 votes1 answer195 viewsLaravel Auth with SubdominioGood morning, I’m trying to perform an auth with Ubdomain, but every time soon on the site returns the error of Too Many Redirects. This is my .env: SESSION_DOMAIN=.meudominio.com.br And the first… laravel laravel-5 laravel-routes subdomain routingasked 6 years, 3 months ago Vitor Marileu Figueredo 155
- 
		4 votes1 answer260 viewsPagination hasMany Laravel 5.1I have the following relationship in my Model Client: public function Usuario(){ return $this->hasMany('SIST\Models\Admin\Usuario', 'id_cliente'); } I pass the customer data through my… 
- 
		4 votes1 answer688 viewsAmbiguous column - Laravel 5.1Good morning! Here’s the thing... I have these 2 tables in my postgresql database: tipos_risco --id --nome agentes_risco --id --nome --id_tipo_risco (foreign key) The problem is I’m not getting the… 
- 
		4 votes1 answer324 viewsInitial Value Sequences Postgresql - Laravel 5.1Good morning, I am running some tests on my application, but I have the following problem: After the migrate and the db:seed, whenever I will enter some record by applying a duplicated primary key… 
- 
		4 votes2 answers1676 viewsMethod App::setLocale() in Laravel 5.2After organizing my code, I tested to see if it worked for real-time language changes with the method App::setLocale() doesn’t work, but when I change the file app.php the locale it works perfectly,… 
- 
		4 votes1 answer1000 viewsHow does Laravel 5 make an instance to be passed automatically if we just set Type Hinting in the parameter in a function?I believe that this is a fully valid curiosity, since it greatly facilitates and speeds up development. I always analyze the code of the frameworks I use, such as Cakephp 2, Laravel 4 and Symfony 2.… 
- 
		4 votes1 answer405 viewsHow to validate login without redirecting the page?I have the following login form in a dropdown, my question is the following, how to validate the login without redirecting the page? Currently when the user informs a wrong password he is redirected… 
- 
		4 votes1 answer664 viewsUse 'WHERE' if value is different from 'NULL' in a search systemI’m trying to make a simple search system with some text fields: $nome = $request->nome; $email = $request->email; $bairro = $request->bairro; $request = Contato::where('nome', 'like',… 
- 
		4 votes2 answers3070 viewsHow to see the queries that were executed by the eloquent in Laravel?How can I find out which queries were executed in Laravel? For example, I have the following query: $usuarios = Usuario::with('nivel')->where(['status' => 1])->get(); I would like to know… php laravel laravel-5 laravel-4 laravel-eloquentasked 9 years, 2 months ago Wallace Maxters 102,340
- 
		4 votes1 answer122 viewsDo a Hasmany per date with Laravel 5.3?Is there any way to make a HasMany bringing records by date? public function despesas() { return $this->hasMany(Despesa::class); //registros apenas desse mês } I tried to use the following, but… php laravel laravel-5 laravel-eloquent laravel-5.3asked 8 years, 11 months ago Felipe Paetzold 4,527
- 
		4 votes1 answer7065 viewsLEFT JOIN com AND no Eloquent Laravel 5I have a query with Left Join with AND I’m not able to implement it in Laravel 5. A snippet of the query: LEFT JOIN visitante v ON a.codigo = v.id AND v.data BETWEEN '2015-06-01' and '2016-05-31'… 
- 
		4 votes1 answer2227 viewsRelationship problems one for manyI’m trying to create a CRUD simple category and subcategory registration where a category may have several subcategories but a subcategory may have only one category. On my migrátion I made my… laravel-5asked 9 years, 1 month ago Renan Rodrigues 3,709
- 
		4 votes1 answer4352 viewsHow to access the public Storage directory in Laravel 5.3?I need to access images saved in the directory /storage/app/public in views, but I can’t, I have a 404. Here’s what I’m doing: <div class="row"> <img src="../storage/app/public/3.jpg">… 
- 
		4 votes1 answer103 viewsProblems with auth::RoutesI’m having trouble with Auth::routes() use the framework Laravel in the version 5.2 my route archive is like this: Route::singularResourceParameters(); Auth::routes(); Route::group(['middleware'… 
- 
		4 votes1 answer381 viewsWhy aren’t my custom error pages being called?My custom error page is not being called. OS: Linux Ubuntu PHP 7 / Laravel 5.5 I already created the folder "Resources/errors" and in it the file "404.blade.php" I already gave permission in the OS… 
- 
		4 votes1 answer13616 viewsHow to create a cron in Laravel?I have to create a Cron on Laravel to send emails every 24 hours. I’m supposed to upload data from the bank. So after a query in the database cron should send the email with the query data. 
- 
		4 votes1 answer756 viewsRemove "public" directory from Laravel 5 by IIS web.configI have an IIS server where a site built in Laravel 5.3 will be hosted and I need to remove the public folder from the url. NOTE: I am aware that if I enter the IIS manager and change the destination… 
- 
		4 votes1 answer1794 viewsSave multiple attributes to the same object in LaravelI have an immovable table other of attributes and created an immovel_attribute table since an immovable can have several attributes. I created the models Immovel and Attribute, need to create a… 
- 
		4 votes1 answer1002 viewsSave Relationship 1:1 on Laravel 5.3In my scenario, I have tables of users and teachers, where a teacher has a user, so I have a relationship 1:1. Migrations: create_users_table Schema::create('users', function (Blueprint $table) {… 
- 
		4 votes1 answer343 viewsGettype() LaravelI’m trying to get the type of the columns of the tables of my BD, and how to use PHP with the Laravel I tried to use the GetType to pick up the guys and show on view. But the code is only returning… 
- 
		4 votes1 answer7792 viewsPDF Generator with Laravel Framework?I need to do the snappy generate reports from BD. But for that I needed examples of using the snappy, in the documentation of github there’s an example, but that example didn’t help me. I needed an… 
- 
		4 votes1 answer1366 viewsLaravel 5 - How to connect multiple Bases at the same time?I’ve researched several places, and they all end up leading to that link. But I could not work using the methods given in the link. The problem: I have 3 banks configured in config/database.php:…