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 answer261 viewsBlock access to Vue js routes if you are not logged inI am unable to block routes are going through normal without authentication I am developing a Dashboard and came to doubt how to prohibit access to routes if not logged in, with this, I thought of… 
- 
		-1 votes2 answers89 viewsConsultation Laravel Eloquent 3 belongtomany tables1 2 3 I have 3 tables, Users, Roles and Permissions Example: User Carlos has 1 Role Admin and 1 Role Admin has 2 Permissions admin and user count(Auth::user() ->roles() ->with('permissions')… 
- 
		-1 votes1 answer152 viewsRestricting access to routes if the user is not logged in VuejsI am unable to block routes are going through normal without authentication I am developing a web application and I have a question about how to prohibit access to routes if they are not logged in,… 
- 
		-1 votes1 answer39 viewsCreate foreach with another foreach resultI have a Course and this course has 1 or several Modules, and each Module has 1 or several disciplines. In my controller I did so: $_modSelecionados =… 
- 
		-1 votes1 answer112 viewsproblems with Axios and React-Native. Axios returning empty attributesAll right? I am developing an application for a client in React-On, due to some integrations that the app needs to have I developed his backend using Laravel 6.x. So far so good, I’ve done all the… 
- 
		-1 votes1 answer383 viewsAccumulated balance with multiple accounts - SQLI’m having trouble creating an account statement that has the option to filter all accounts and/or only a few accounts. I am using this SQL to appear these record this way select bancos.id,… 
- 
		-1 votes1 answer102 viewsError sending email PHP-LaravelHello, everybody! I am studying PHP-Laravel (I am new in the language tb). I need to send an email, but it is presenting me the error Symfony Component Debug Exception Fatalthrowableerror: Class… 
- 
		-1 votes1 answer175 viewsLaravel 6 custom validationHi, guys! I’m new in Laravel and wanted to ask a question about the validations. This is my controller. When I call the Validator, i am passing the arrays to Rules, messages and Attributes.… 
- 
		-1 votes1 answer699 viewsNot operating route in productionI’m having a problem, I recently deployed a 6 Airframe project in production. I have the following route: Route::get('/', function () { return view('welcome'); }); Route::resource('email',… 
- 
		-1 votes1 answer102 viewsDB Query inside a foreach loop is making my page slowThe code below is used to show a table with 15 results on a page. For this, I am using two different databases, one of them is a wordpress database and the other is a personal database that I… 
- 
		-1 votes1 answer305 viewsAuthentication in the Laravel accessing routes protected by auth middlewareGood morning, I’m making a little project with Laravel, I’m at the authentication part and I had a question. i protected a group of routes with middleware auth so the user will only be able to… 
- 
		-1 votes1 answer43 viewsClear city variable when selecting another stateI have a little doubt. I have a view that when the user selects a state, loads the list of cities from the database. But it’s having two problems: When you select the state, the selected city is any… 
- 
		-1 votes1 answer77 viewsERROR WHILE UPLOADING LaravelSirs, I am having the following error "The "/tmp/php63F4kk" file does not exist or is not readable." in Laravel, I am entering the information as follows: if($request->hasfile('foto')) { $image =… 
- 
		-1 votes1 answer208 viewsLaravel in hosting only works at homeI followed a tutorial where the folder of the Laravel goes outside public_html and changes public_html/index.php to require __DIR__.'/../projeto/vendor/autoload.php'; $app = require_once… 
- 
		-1 votes1 answer59 viewsProblems to delete with ajax in Laravel 5.3Controller public function deletar($id) { $dado = Todo::find($id)->delete(); return response()->json($dado); } Route Route::get('/deletar/{id}',['as'=>'todo.deletar',… 
- 
		-1 votes2 answers354 viewsError mimetype application/octet-stream in jpeg image with LaravelWhen trying to upload an image with Laravel I notice a different code behavior depending on the size of the image preventing the upload of the file as demonstrated in the image below that I get with… 
- 
		-1 votes1 answer179 viewsproblem with Routes Laravel 7.0 shared hostingOops! First your lay half still in the Aravel I was able to put in production (shared server Cpanel Locaweb) but I work in parts the index stay top consulting the bank using multTenant so as other… 
- 
		-1 votes1 answer312 viewsHow to pick up the selected data from a checkbox by the checkboxHello, all right? I have the following form: <div class="form-group"> <label for="stock_options">Opções de Estoque</label> @foreach($stockOptions as $stockOption) <div… 
- 
		-1 votes1 answer68 viewsLaravel 7, how to call iterate an input that has no right nameI am making a small form in Laravel 7 and in Javascript I have a button that adds the fields that the user needs to create the necessary questions. Javascript $(btnQuestions).click(function () {… 
- 
		-1 votes1 answer33 viewsHow to add a new table 1:N (one for many) in an existing database via Migration Laravel?Hello! I need to add a new table in an existing comic. I use the Laravel Framework and I would like to do this via Migration, but every time I try it makes a mistake and I don’t know what I might be… 
- 
		-1 votes1 answer105 viewsClass 'Spipu Html2pdf Html2pdf' not foundI’m a beginner in Laravel. I got a legacy system with the following settings: Laravel 3.2.12 and PHP 5.6. This system uses DOMPDF. However, it cannot generate one of the html files due to the size.… 
- 
		-1 votes1 answer38 viewsHow to insert title in pagination links and button::make - Yajra Laravel DatatablesHello, everybody! I use Datatables for Yajra’s Laravel, and I need to adapt it to accessibility. Unfortunately, I am unable to insert title in the Button::make or pagination links. Regarding… 
- 
		-1 votes2 answers121 viewsHow to access foreign key table in Laravel to return in a ViewI am working on the project in the Flat and I can not solve the following problem: I have a Call List that’s being shown like this: I wanted to put the name in place of the code in the columns.… laravelasked 5 years, 3 months ago Paulo Martins 390
- 
		-1 votes1 answer74 viewsQuery works on phpmyadmin, but not on LaravelGalley, Laravel helps a lot, but when he wants to complicate too, it really does. I did a query and tested in phpmyadmin and it works normally, but insert the query in my project Laravel gives… 
- 
		-1 votes1 answer129 viewsHow to insert data into a table that has multiple Foreign key and relates to other 4 tables using Laravel with Eloquent?I have a table that has 4 foreign Keys and relates to 4 other tables. I would like to know how I would insert all the records, coming in Request, in this table, including your Foreign key. I’m a… laravelasked 5 years, 3 months ago Gato de Schrödinger 2,367
- 
		-1 votes1 answer105 viewsHow do I subquery Laravel based on this information?I have the tables: Notifications: users: ... And I got the following code that’s in my controller: public function allRelations($internalClientId) { $internalClient =… laravelasked 5 years, 2 months ago Gato de Schrödinger 2,367
- 
		-1 votes1 answer50 viewsUpgrade from Laravel 5.7 to 5.8Good morning dear friends, I am making the migration of my personal project from Laravel 5.7 to 5.8, but there is a part in the documentation that I didn’t understand very well, it may be a silly… laravelasked 5 years, 1 month ago Alvaro Alves 1,065
- 
		-1 votes3 answers563 viewsPass view data array to Laravel controllerI’m trying to pass an array of mine view for a controller (it will generate a pdf) in Laravel. I know there’s a chance I could do it this way: <form class="form-horizontal" method="get"… 
- 
		-1 votes1 answer20 viewsError 1215 with foreign keyI am working my first relationship of one to one tables in Laravel for countries and locations, created the models and migrate them to the two tables. Country table: public function up() {… 
- 
		-1 votes1 answer85 viewsMount Array with categories and subcategories that are in the same tableI am trying to assemble an array, but I am not getting, before the following table, I need to assemble the array as in the example below the photo. 6.x Standard design in the'categoria_id 'columns… 
- 
		-1 votes1 answer98 viewsParameter problems in API (Laravel) routesHello! I’m starting my studies on api Rest. In my application I can only return the employee data according to the id of the company that it belongs to, however, the api is returning the data… 
- 
		-1 votes1 answer44 viewsI need to mount a query with Mysql through Laravel (Eloquent)I have to get data from 3 tables(planejamento_objetivo, planejamento and equipe) and then apply a period filter and team. Assemble query to bring up table data planejamento_objetivo. It will only… 
- 
		-1 votes1 answer59 viewsAdd a function in Laravel Route ResourceI’m new to Laravel, I have a question, I want to implement a function beyond what already exists in the part of Resource. In Resource it looks like this Route::resources([ 'users' =>… 
- 
		-1 votes1 answer42 viewsMultiple SQL column query - LaravelGuys, I’m trying to make a query, where I have several fields to perform this search, and some null field may come. I’m using Laravel with Angular, I don’t know if I can do this consultation on the… 
- 
		-1 votes1 answer173 viewsLaravel 8: Recover Data from Logged In UserHello, i do not use a suggested default user table in Laravel, as I am creating a frontend in a database already exists. The whole login process is working properly, with password user verification.… 
- 
		-1 votes2 answers247 viewsMiddleware in the Laravel to check if the user belongs to a groupGood morning and my first post here, I want to create a check in the Standard to check if the logged-in user belongs to the group ex: IT, DIRECTORATE, ADMINISTRATION etc. I already do the check on… 
- 
		-1 votes1 answer149 viewsLaravel route with error 404I am working on an implementation with React and Node (services), but the API is in Laravel. To bring information from the database I needed to create a route, in a preconfigured group. But when I… 
- 
		-1 votes1 answer23 viewsLoop Laravel making only one Insert in the bank, when it should do severalI’m not getting enough inserts in the database with a loop. At the time of insert, he only makes one. public function store(Request $request){ $contrato = new Contrato(); $contrato->cont_aluno =… 
- 
		-1 votes1 answer31 viewsLaravel 8.12: syntax error, Unexpected 'min' (T_STRING), expecting ')'I am developing a project using Laravel 8.12 and PHP 7.3.21 and am facing the problem below. Below is the contents of the head.blade.php file. @stack('head_start') <meta charset="utf-8">… laravelasked 4 years, 9 months ago Guilherme Leandro Freitas 1
- 
		-1 votes1 answer46 viewsfilter cities by state in Laravel with Javascript?I have a city and a state camp, I would like when click on the field and select a certain state, in the city options appear only the cities related to that specific state. it is in my local… 
- 
		-1 votes1 answer154 viewsLaravel-mix error in syntax when there is noneGood evening guys, I’m trying to run NPM RUN DEV and when I do he accuses a mistake that doesn’t make sense to me (despite being a total beginner in Latin). [webpack-cli]… 
- 
		-1 votes1 answer41 viewsLaravel with firebaseI was wondering if there is any way to simulate that Firebase system (which is not yet compatible with PHP) to receive the information from the database in real time. I’m using Laravel, I collect… 
- 
		-1 votes1 answer22 viewsI need to list 3 tables in the Standard, somebody help!!! I tried it anyway!I have 3 tables Sales ID | TITULO Brokers ID | NOME Relas - "Make the relationship between the tables" ID | VENDAS_ID | CORRETORES_ID | TIPO I need the table relas make the relationship between the… 
- 
		-1 votes1 answer89 views$imoveis is Undefined, indefinite variable in BladeThe variable $imoveis in Blade is undefined, for me it is correct in the code. @extends('layouts.main') @section('title', 'Web Room') @section('content') <h1>Imoveis web</h1> <div… 
- 
		-1 votes1 answer27 viewsInsert user information in the registration confirmation email messageI want to know how I do to insert user information in the email registration confirmation message. It would be to put the name, email and even an image with the company logo. model: User.php… 
- 
		-1 votes1 answer125 viewsHow popular to select according to other select data in Laravel?I would like to make a dynamic select so that when I choose the state, load the cities of that state into the other select. City and state are in different tables, but have foreign key, so when I… 
- 
		-1 votes1 answer35 viewsLaravel - Controller - Show data from two tablesI’m having trouble showing data for two related tables. Controller: public Function index(){ $tabela = capitulo::orderby('id', 'desc')->paginate(); $tabela1 = documentacao::orderby('id',… 
- 
		-1 votes1 answer32 viewsLimit a table to the print page limitGood afternoon, I’m new to programming and I’m testing some things hehehe. I wonder if it is possible to generate a limited table with empty spaces (according to the image) that the limit would be… 
- 
		-1 votes1 answer32 viewsError When Returning Data in View - Laravel 5.5, PHP and adldap2I created a list of Extensions through PHP and Laravel 5.5 and I’m having difficulty displaying the query data $users in the view why I can’t properly traverse the fields with Foreach What’s wrong… 
- 
		-1 votes1 answer49 viewsSkip foreach result every two resultsI have some results in the bank and need to align them according to the image below. But I could not. I am doing in Laravel 5.8. <table style="border-collapse: collapse; width: 100%;"…