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
answer26
viewsSubmit button only works on second click - Laravel 8
I am working with Laravel 8, but I am very new still in this framework, and I came across a problem that is a Ubmit button that only sends my request in the second click, in the first it just…
-
-1
votes1
answer43
viewsHow do I create a counter inside a FORELSE or FOREACH in Laravel?
I am displaying a list of system members. But I would like to display only 10 members using the syntax @forelse in Laravel. How do I implement a counter that displays only the first 10 records in…
-
-1
votes1
answer43
viewsHow to implement history of all done operations
I need to log all changes, insertion and removal operations. So far I did some tests, capturing the name of the fields in the forms that had their values changed (this for editing cases). I am…
-
-1
votes0
answers53
viewsError php Artisan serves "Failed Opening required"
PHP Warning: require(C:\Users\Tatiana\Desktop\JME\new-jmepecas-master/vendor/autoload.php): Failed to open stream: No such file or directory in…
-
-1
votes0
answers14
viewsIs it possible through an Migration to use a replace to change a data record of an already populated table?
In the database there are already some data entered, and I need through an Migration to make a change to take the value that is there and change the "." by "/". Ex: there in ID 1, has the value…
-
-1
votes0
answers23
viewsHow to position elements outside the container using bootstrap?
in my example I need to put an image out The code is like this <div class="img-mobile"> <img src="{{asset('assets/front/img/contato/jeep-img.jpg')}}" alt="Imagem do carro Jeep"> /*aqui a…
-
-1
votes0
answers34
viewsRecover database record and display on user screen with Laravel 8
I’m a beginner and I’m struggling to get back the database data and display on screen. I have the following scenario: I have an input field to put the numbers of a CPF that has already registered in…
-
-1
votes0
answers23
viewsQuery exceeding server limit, but in the local is ok, Orange
I wonder if you have how to optimize this query, not have to change server for now. $enterprisesIds = Survey::select('survey_enterprise.enterprise_id') ->join('survey_enterprise',…
-
-1
votes1
answer22
viewsLaravel - json_encode() does not work
Bring to Laravel in array format. [compacto] =>…
-
-1
votes0
answers16
viewsNotfound error while downloading a file while trying to download it with Laravel 8
I’m really not understanding, the links work the files exist but it gives a Filenotfoundexception when I try to download using the Internet with vuejs File not found at path:…
-
-1
votes0
answers14
viewsBrowse Array with foreach PHP Laravel
Hello I have the following array that is coming from a Collection of Laravel [ {"id":1,"providence_management_id":4,"email":"[email protected]"},…
-
-1
votes0
answers7
viewsHelp to build a query in Mysql - Build a query between two tables, each table is in a different database
Gentlemen good afternoon I am a junior programmer, and I came across a situation in the company , which I can not solve , what happens , we need to compare two values , but each value is in a…
-
-2
votes1
answer517
viewsHow to deal with multiple login areas in Laravel?
In my application I have 3 distinct areas: Admin Where everything is managed, currently the authentication is done by Sentry (very good by the way). For this area I have the Users model that…
-
-2
votes3
answers1814
viewsInstallation of Laravel
It is possible to install the Laravel in any shared accommodation? Or the requirements for installation are very specific.
-
-2
votes1
answer100
viewsWhat causes this mistake?
The system was working normally. Suddenly I get this error message: Error in exception handler: View [errors.message] not found. in /home/storage/b/24/ff/... I can’t log into the system. What is the…
-
-2
votes2
answers621
viewsGroup route does not work on Laravel 5
Good night guys, all right? I have a problem in Laravel 5 routes. I have a group of routes to the administrative panel of the site (routes with prefix panel) and within the group I want the first…
-
-2
votes1
answer131
viewsHow to use Try catch to handle id variable error in Findorfail
public function finalizarCompra () { try { $compra = Compra::findOrFail($compra->id); } catch(ModelNotFoundException $e){ return "erro"; } }
-
-2
votes3
answers1027
viewsLARAVEL 5.3 Blade template is not updating the page
Good morning. I’m a beginner in the PHP Laravel framework and I’m having the following difficulty: I write my html inside my .blade.php file and call it in a view on Route but the information I…
-
-2
votes1
answer101
viewsError picking up data for a view
I’m trying to bring the data to a view to perform some tests on Laravel but it’s not working Controller class ProfileController extends Controller { private $aluno; private $request; public function…
-
-2
votes1
answer1053
viewsPrinting non tax PHP coupon
Hello, I was wondering if it is possible to print tax-free coupon via PHP? If so, how could I implement it? I use Laravel 5.5
-
-2
votes1
answer896
viewsI need to format date for Brazil
Hello, I need to show the date 00-00-0000 as I do in this code below? <span data-bind="text: created_at"></span> I appreciate any help
-
-2
votes1
answer333
viewsREST API endpoint standard
I’m creating an application similar to Twitter using Laravel and React, where the database has tables: Post, User, Relation, Mention and Repost. On the 'Timeline' screen of the application will be…
-
-2
votes1
answer645
viewsInsert Image in Laravel Slide Template
How do I insert images into my Laravel Blade template? I want images on my homepage but can not link, I created a folder images inside public to store my images.
-
-2
votes1
answer207
viewssyntax error, Unexpected 'endforeach' (T_ENDFOREACH), expecting end of file. Does anyone have any idea why this error?
<html> <body> <h1>Listagem de Produtos</h1> <table> <?php foreach($produtos as $p) ?> <tr> <td><?php $p->nome…
-
-2
votes1
answer207
viewsError loading XML into Laravel
I am getting the error below when loading XML using Laravel. I tested the import with pure PHP and it was normally. Does anyone have any idea what it might be? I understand that " is…
-
-2
votes2
answers3366
viewsHow to fix error: String data, right truncated: 1406
Hello, follow my question: I am trying to save the Protocol Checklist data, but the following error is occurring: SQLSTATE[22001]: String data, right truncated: 1406 Data Too long for column 'item'…
-
-2
votes2
answers455
viewsLaravel - How to call several methods passing the same route?
When I pass the two ends bugging the other and vice versa. Example: Route::get('/psicologo/editar/{psi_codigo}','PsicologoControlador@edit');…
laravelasked 5 years, 11 months ago user9078159 5 -
-2
votes1
answer83
viewscompare pdf size in readable
Next I have an application in Arabic that I put a pdf in a register, but when the pdf is too big it of the error, would have as I know up to which PDF size I can use and if the guy put a pdf greater…
-
-2
votes1
answer126
viewsIs it possible for an Laravel API to consume a Node API and that Node API to call that same Laravel API in a request?
I have a client (front-end) that consumes an endpoint in an Laravel API, this endpoint communicates with an API in Node.js and this API in Node.js calls Laravel API methods (which called the Node…
-
-2
votes1
answer32
viewsRequest all picking up only last value (LARAVEL)
I made a Function a few days ago that saved several photos at once. It worked, but when I went to use this Function again, she was just getting the last amount I was sending. Example: I sent photo1,…
-
-2
votes2
answers340
viewsAfter the user logs out, he leaves, but if you click the back arrow of the browser he accesses again
The logout code [Standard] public function logout(Request $request) { $guard = $this->getGuard(); Auth::guard($guard)->logout(); $request->session()->flush(); return redirect('/'); }…
-
-2
votes1
answer47
viewsProblem With Git
I have a problem with Github, my project is in Laravel, I create the repository do the sending (I can see that git picked up the modifications inside the files) but when I upload to github the files…
-
-2
votes1
answer46
viewsHow do I make it impossible for the person to submit the form several times in Laravel?
I programmed a website in the Standard, but I can’t increase a function that makes it impossible for the user to send the form several times by clicking the button.
-
-2
votes1
answer55
viewsVariable returns NULL - Trying to get Property of non-object Variable returns NULL
Somebody help me I’m making this mistake Variable returns NULL - Trying to get Property of non-object…
laravelasked 5 years, 1 month ago user160990 -
-2
votes1
answer676
viewscompare bank date with current date LARAVEL
How do I compare the date created_at with the current date and show the notes with that date index php. @if(\Carbon\Carbon::create($data)->format('d-m-Y') ===…
-
-2
votes1
answer208
viewsUndefined variable: message Laravel
I have the following problem in the Windows view $message is undefined in the whole variable $message and standard at least as indicated in the documentation in the validation part of Forms Blade…
-
-2
votes2
answers3037
viewsError file_put_contents() failed to open stream: No such file or directory
Good afternoon! I believe I deleted one of the folders incorrectly STORAGE and now my project is with the error to follow…
-
-2
votes1
answer922
viewsLaravel - Popular a list with files in a directory
I would like to popular a list on a Blade page in the Laravel Framework. I tried to do <select id="idSelMinhaLista"> @if(isset($arrayRemessa)) @for($i=0;$i < count($arrayRemessa);$i++)…
-
-2
votes1
answer43
viewsConnection with Sqlite returns Unsupported driver [C]
I’m trying to use Sqlite in a project but when performing any command with Sqlite returns: Unsupported driver [C]. this is my configuration on database php. 'sqlite' => [ 'driver' => 'sqlite',…
-
-2
votes1
answer31
viewsError while doing update in the Standard
When trying to perform the following update: $criterios = Criterios::find(1); $criterios->update( [ 'criterios' => $request->criterios 'editado_por' => $user->id ] ); I get the error:…
-
-2
votes3
answers61
viewsWhen creating a new user, the user being used is logged in and the new user is logged in automatically
I’m having a problem with the method of creating a new user in Windows, because I changed the method of registering users on my system so only administrators users can create new users, but every…
-
-2
votes1
answer89
viewsFramework php file error in vendor folder
When I open my project in the framework Laravel which is in the programming language in php, have error in vendor folder, any project I create in the framework has this error The error path in the…
-
-2
votes1
answer39
viewsLocation of a variable
Route::get('/', function () { return view('welcome'); }); Route::view('/teste', 'teste'); Route::get('/noticia/{slug}', function($slug){ if($slug != null): Route::redirect('noticia/{$slug}', '/');…
-
-2
votes1
answer168
viewsDoes "Artisan" need the cmd to remain open?
When typing the command php artisan server in the folder of the project cmd he returns me the message: Starting Laravel development server: http://127.0.0.1:8000 I realize that the web page of…
-
-2
votes1
answer92
viewsI can’t create an Laravel 5.7 project
I can create Laravel projects in versions 8, 7 and 6 with Composer. However, when trying to create a project in version 5.7 or even 5.8, the console has an error. And the error presented is:…
-
-2
votes2
answers33
viewsLaravel : Form and fetch the ID
Is there any way to fetch the ID (to store in the BD) and the name for the user to select ? <option selected>Escolher Capitulo</option> @foreach($capitulos as $cap) <option…
-
-2
votes1
answer33
viewsLarval change Auto-increment from Id to id-Year
I wonder if it is possible in washable to change the auto-increment from "Id" to "id-Year" Example: When we have a user with Id:2 I wish it had id: 2-2021 If possible, how can I make this amendment…
-
-2
votes1
answer23
viewshow to define the last translation used by the user on the platform
I have a platform with 6 different languages and I need to keep the last language selected for the user on the platform, but I don’t know how to do it, how can I do it? for example: if the user uses…
laravelasked 3 years, 4 months ago Lucas Steinbach 1 -
-2
votes1
answer191
viewsPHP - While function
Good morning, I have a question about the function while in my project Laravel. Here’s how it works: User has an X number of credits - column credits in the database. It uses an xlsx file with the…
-
-2
votes1
answer724
viewsErrorexception (E_ERROR) Undefined variable: messages
I am trying to display all records of a table but have the following error: Undefined variable: messages (View: /Users/Henrique/Documents/Laravel Projects/blog/Resources/views/messages.blade.php) my…