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
-
0
votes1
answer34
viewsHow to display data correctly in a datatable
I need some information about running two tables through the index. I have the following code in the controller: public function index(){ $tabela = capitulo::orderby('id', 'desc')->paginate();…
-
0
votes0
answers34
viewsCalling a variable or method within a static method
Hi, I’m using Laravel on this app. I have a static method called get() (Which was created in a Class I did not gain access to) and inside it I need to access an external variable called $routeTo. I…
-
0
votes0
answers29
viewsLaravel Dusk and Select2
I am working with Laravel 8 and for the screen tests I am using the Dusk (https://laravel.com/docs/8.x/dusk). On one of the screens I have a Select2 with the property "tags" enabled…
-
0
votes0
answers100
viewsHow to pick up the response object of an ajax request with Laravel?
Staff I am making a fetch request to the Variable without using jquery and would like to get the return of this request, however when I give a console.log() in Sponse the console informs Undefined.…
-
0
votes0
answers94
viewsHow to use the middleware auth in Laravel 8 correctly?
People created this group of routes for certain pages of my project to be protected by middleware auth: Route::group(['prefix' => 'admin', 'namespace' => 'Admin', 'as' => 'admin.'],…
-
0
votes0
answers82
viewsLaravel 8 Jetstream hot Reload and Sync browser do not work
Greetings to all, I have a big problem in a system that I just created. I did the standard installation of Laravel 8 with Jetstream using Docker and sail... But I can’t seem to do the npm run hot or…
-
0
votes0
answers14
viewsDusk with the --filter option returns "No tests executed!" - Laravel
I am with a project Laravel 8, I created a test with the command php Artisan make:testTwo, however when I try to run it with --filter returns me: Test code generated with make <?php namespace…
laravelasked 3 years, 6 months ago Paulo Martins 390 -
0
votes1
answer21
viewsVariable-8 error with Cache::Remember() function
My application is returning an error while storing the cache, I saw it was saving, but it is returning this error. Can anyone tell me why? Here is my function and error: function that returns error:…
-
0
votes1
answer30
viewsHow to get the values of an object from an array returned from Laravel?
I need to get the values an array that is being returned from the Laravel, but I’m not getting to understand how to do this. Laravel: if ($request->ajax()) { return response()->json([…
-
0
votes0
answers25
viewsHandle. srt files with PHP
I am developing a project in Laravel 8 and this project consists of a SRT subtitle management system. In the world of subtitling teams divide an entire caption (srt file) into several slots. In…
-
0
votes1
answer72
viewsFailed to parse time no eloquent
I have the following code: select('id','title', 'description', 'author', DB::raw("DATE_FORMAT(created_at,'%d/%m/%Y') AS created_at"))->get(); when I run it returns me the following error: erro":…
-
0
votes1
answer31
viewsRedirect from a URL within the Laravel
Good afternoon, I have a problem: I have a system for the company that I work with that is used only internally, so it is accessed only through VPN, however we will open this system to external…
-
0
votes0
answers20
viewsLaravel confirmation modal / Livewire
Hello, good afternoon. I have a list of items being listed in Lade with Livewire, but it turns out one of the actions that can be done is to mark the situation as resolved. But this process needs to…
-
0
votes2
answers30
viewsGet default response if it does not exist in Laravel’s Wherein
I’m searching a series of items in a DB using Laravel through the function whereIn(). When returning, it presents a Collection with the information found, the problem happens when it does not find…
-
0
votes0
answers22
viewsNot allowed to load local Resource: file
I’m having the following problem Not allowed to load local Resource:…
laravelasked 3 years, 4 months ago Lucas Steinbach 1 -
0
votes1
answer39
viewsError while running migrate
Schema::create('filiais', function (Blueprint $table) { $table->id(); $table->string('filial', 30); $table->timestamps(); }); Schema::create('produto_filiais', function (Blueprint $table) {…
-
0
votes1
answer43
viewsDoubt about Laravel’s basic structure!
Is there any recommendation to follow from the Laravel framework when starting a project? I ask this because when starting a project already comes by default with some predefined structures! saw…
-
0
votes0
answers19
viewssail file not found ( Laravel )
I’ve used composer install, php artisan sail:install, ./vendor/bin/sail up -d, ./vendor/bin/sail, ./vendor/bin/sail build. Everyone returns to me \vendor\bin\/../laravel/sail/bin/sail: No such file…
laravelasked 3 years, 3 months ago Tatiana Scheidegger de Aguiar 1 -
0
votes1
answer36
viewsError creating php conditional
I am creating a command in Laravel(php) that looks for an image file that is blob in the database and saved in a folder, And as not all users have image I want to make a conditional that if the file…
-
0
votes0
answers27
views[Vue warn]: Error in render: "Typeerror: Cannot read Property 'image' of Undefined" also Happens Property "name" and "price"
In the Userboard.Ve template I bring the selected product with image, name and price, but does not yield and presents the error: vue.esm.js?a026:628 [Vue warn]: Error in render: "TypeError: Cannot…
-
0
votes0
answers15
viewsdynamically popular input with jquery/ajax/Laravel
I have a proprietary select that populates another select with the farms that it owns and with that I am trying to popular an input that brings the city and other input that brings the state of the…
-
0
votes0
answers8
viewsLoad Laravel Storage images with Vue
I’m trying to upload an image that is in Storage Storage public app images of my project Readable with a Vue component that I’m using as monolith within the code but not loading <template> #…
-
0
votes0
answers12
viewsConnect Laravel application on WSL2 with database on Windows
I have a portable application using WSL2 that runs normally. I had a recent problem when I needed to connect this application with the database that is installed on Windows. I tried to connect…
-
-1
votes1
answer184
viewsError installing Laravel via Poser (Mcrypt required)
While trying to install Laravel via Composer, he told me that he needs the extension Mcrypt. I am using OS linux Ubuntu 13.04 Zend Server CE Server 6.3 apache 2.2; php5.4; But nothing damn works.…
-
-1
votes2
answers372
viewsLaravel 4 Deploy Failure in Shared Hosting
I’m looking to move up my first project with the Laravel 4 framework and I’m in trouble. I uploaded all the files from the FTP project because there is no other option for hired service. I uploaded…
-
-1
votes3
answers8261
viewsHow to recover the ID of the last record inserted in the bank?
How do I recover the id of the last record made in a table in the database? I’m using Laravel. Before using a framework I used LASTINSERT.
-
-1
votes1
answer1556
views -
-1
votes2
answers82
viewsLaravel does not return variable passed by with
Hello guys beauty? Why Laravel is not resuming the object in the view. Searching for the session I can get the data. /* ProdutoController */ public function deleta($id){ $prod = Produto::find($id);…
-
-1
votes1
answer477
viewsLaravel with Site + Cms + Intranet
I’m creating a website that will contemplate a cms and an intranet. In Cakephp I separated these applications with plugins, that is, site at the root of the/cake project and plugins for others. Very…
-
-1
votes2
answers90
viewsPopular select with result plus a null element
I have a method that invokes the view as follows: return view('auth.register',[ 'teachers' => $this->user->mentors()->lists('name','id'), ]); And in the view, the select using {{…
-
-1
votes2
answers7222
viewsHow to pass a variable to Blade?
I have the following scenario: Some types of user may have access to the site, say USERTYP1, USERTYP2 or USERTYP3. My application menu changes according to user type. I have a master template…
-
-1
votes1
answer68
viewsJavascript - Error loading new files
I have a page that contains mosaic of images with a button and when I click I open a Popover. Until then ok, because this mosaic is generated by Blade.php, of Laravel 5. But I change the mosaic from…
-
-1
votes1
answer473
viewsSelect multiple checkbox with foreach, coming from the bank in Aravel?
I’m populating a checkbox with the bank information, I’m trying to get it to read all the checkbox selected. Controller public function store(RequestProduto $request) { $data = new Produtos;…
-
-1
votes1
answer353
viewsSql in Postgresql: Do Not Repeat Values from a Table field
I have a select that displays the names, date and amounts paid by customers. I must display a list without repeating the names. SELECT c.name, p.created_at, p.amount_paid FROM payments as p, clients…
-
-1
votes2
answers1993
viewsHow to get the values inside an array?
0 => {#557 ▼ +"nis": 1 } 1 => {#561 ▼ +"nis": 16192248487 } I have this array, I want to get the values: 1 and 16192248487, and plays them in a variable to give a dd and print them on the…
-
-1
votes1
answer444
viewsStylization of views - Laravel
By Laravel’s default, the view welcome.blade.php comes with styling in the view itself and not in a separate file. I wonder if this practice of styling the view in the same file is correct or should…
-
-1
votes1
answer187
viewsLaravel 5.5 Routes?
I can’t find the file routes.php Laravel 5.5 is not inside the folder http there’s only one inside http > controller/middleware/kernel and that’s what’s inside?…
-
-1
votes1
answer60
viewsKey file Permissions are not correct, should be 600 or 660 Instead of 644
The error returned is as follows: Key file Permissions are not correct, should be 600 or 660 Instead of 644 Can anyone help me solve this error ? I know I have to change to 600 or 644 , but I do not…
-
-1
votes1
answer57
viewsHow to access a json with jquery being passed by php
I’m passing a json to my view and I need to play inside the full Legends Vents, but I don’t know how to access this json through my URL in my localhost the view path that gets json is this…
-
-1
votes1
answer994
viewsLaravel + L5-Repository
Dear, I’m trying to install the L5-Repository and give the command: composer require prettus/l5-repository and the following appears: Using version ^2.6 for prettus/l5-repository ./composer.json has…
-
-1
votes1
answer632
views -
-1
votes1
answer601
viewsUndefined variable Laravel error
I have a management system of football championships, but I’m having problems to display the data of the specific championship, I’ve researched about the error, but I can’t find where is missing the…
-
-1
votes1
answer171
viewsProblems with php Artisan command using Laradock
Whenever I use the Artisan command of Laravel in my laradock Workspace to create a controller, a model or any other file I can neither save nor delete this generated file, the system (Linux Mint)…
-
-1
votes2
answers461
viewsGenerating PDF with Laravel
I’m trying to implement this pdf lib for my Laravel project: https://tcpdf.org/. Since I’m having problems in the implementation, because its documentation is not very clear with the method I need…
-
-1
votes1
answer20
viewsEloquent returning field and value
My select is returning the field and value of the id that is in the table and need to return only the value,? $id = DB::table('participantes') ->select('id') ->orderBy('id','DESC')…
-
-1
votes1
answer223
viewsLaravel jwt token
I am using tymondesigns/jwt-auth to generate token Is working The problem is that I want to change the validity time of the token to 1 minute to do tests I changed the jwt.php file: 'ttl' =>…
-
-1
votes1
answer66
viewsLaravel - Jquery Event preventDefault is not allowing entering the records in the database?
I used the following code JQuery to avoid page reloading when entering a record in the bank. actually stopped reloading, but is not allowing to record the records in the database. $(…
laravelasked 5 years, 10 months ago user9078159 5 -
-1
votes1
answer207
viewsHow to convert a text to html
In my database I am saving the body of a news, and it is coming with tags s in html, as I do to show this text without the tags s being saved in the database
-
-1
votes1
answer199
viewsError while deploying Laravel project
By doing the deploy of my application on a Linux machine returns an error stating that the view was not found "View [auth.login] not found." But the view is in the folder, and then the page reloads…
-
-1
votes1
answer531
viewsStore Laravel 5.7 date fields?
I’m not finding a solution to store only date, always required time. Error: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value