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
votes2
answers914
viewsRedirect to another PDF tab
Hey, I need some help! My current project needs to generate a report from one table, great I did with Dompdf, my doubt is how I make the pdf open in another tab and not in the current tab. The…
-
-1
votes1
answer17
viewsHow to generate dynamic urls
I’m working on a project for writers to publish poems and poetry. Urls will be separated by gender, for example: site.com/poems/field flowers/ However, I need to avoid double titles. Because of this…
-
-1
votes1
answer37
viewsLaravel database
Speaks blz people like if it is possible to configure in the file . Laravel env, put data from a database that is in firebase and work locally on the project?
-
-1
votes2
answers68
viewsCheck ID with a single foreach
I wonder if you have a certain id, without having to do two foreach @forelse($surveys as $survey) @forelse($survey->users as $user) @if($user->id == $auth()->user()) AÇÃO @empty @endfor…
-
-1
votes3
answers1047
viewsLaravel - parse_url() expects Parameter 1 to be string, array Given
I’m encountering an error while trying to register data in the database. ErrorException (E_WARNING) parse_url() expects parameter 1 to be string, array given Productocontroller.php public function…
laravelasked 7 years, 1 month ago Barraviera 133 -
-1
votes2
answers3524
viewssystem login Laravel with permission levels
I’m trying to set up a login system but I can’t get the result I need. There are three types of users: Admin User () Teachers () I adapted the make:auth with roles to create teacher and student, is…
-
-1
votes1
answer270
viewsHow to filter records
public Function search1(Request $request) { $data = Cliente::where( 'nome','LIKe', $request->nome . '%' 'situacao',$request->situacao . '=')->get(); return view('cliente.search', […
-
-1
votes1
answer120
viewsOrange Error: [Reflectionexception] Class App Units Commands Inspire does not exist
I’m getting this mistake: Code consoleKernel.php <?php namespace App\Units; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel; use…
-
-1
votes1
answer53
viewsQuery com Laravel
Hello , as would be in lavarel a select like this example: SELECT DADO FROM TABELA WHERE ID = '123' AND (FLAG IS NULL OR FLAG = 0) I couldn’t find similar examples out there :(…
-
-1
votes1
answer343
viewsError returning validation messages with Form Request in Laravel
Hey there, guys! I’m trying to return custom validation messages with Laravel’s Form Request, I’ve already put the validations inside "public Function Rules()", and custom messages inside "public…
-
-1
votes1
answer84
viewsIs there any way to update the entire database eloquently with the Laravel(API)?
I am creating an api and I want to create a method that updates everything but not I know if eloquent has this feature. It’s because I created an app (offline) that sends me all the data at once to…
-
-1
votes2
answers337
viewsLaravel 5.8 find with column name other than "id", how to do?
Good Morning In my controller to make the Show view work I have following code public function show($id){ $produto = Produtos::find($id); return view('produtos.produtosShow', array('produto' =>…
-
-1
votes1
answer22
viewsConvert query to RAW query
What this query looks like in Mysql RAW format? $user = User::query() ->where(static function ($query) use ($indicador) { $query->where('indicador_id', $indicador) ->orWhere('level_ref',…
-
-1
votes1
answer243
viewsHow to make the scroll start at the bottom of the page?
Hi, I have to make a site that starts from the bottom up but I can’t get the scroll to start at the bottom of the page. That’s the script I’m using: $(function scroll() { // scroll all the way down…
-
-1
votes1
answer82
viewsSQLSTATE[HY000] [1105] (proxy) error all backends are down (SQL: select * from `users` Where `id` = 1 limit 1) Standard
I have a website developed in Laravel 5.8, put on the air, and when I am browsing the site I get this error: SQLSTATE[HY000] [1105] (proxy) all backends are down (SQL: select * fromuserswhereid= 1…
-
-1
votes1
answer49
viewsLaravel, connection between the back office and the front office
Good Afternoon, I’m doing a small project with Back Office and Front Office in Laravel. In the back office, all the data that is then presented on the front office is created, that is, the news that…
-
-1
votes1
answer95
viewsLaravel - [DB::Connection(...)->select(...)] Works on one Job, but does not work on another!
Hello, I have a problem that seems impossible to solve. In my Laravel 6.X application, I have a report that performs database extracts for Excel files, this report has two extraction versions: •…
-
-1
votes1
answer98
viewsLoad data from the related table (Laravel) - What is the best way?
Good night. In the view loaded from: Route::get('livro/detail/{id}',['uses'=>'LivroController@detail', 'as' => 'livro.detail']); i can freely load data from table columns Books, for in the…
-
-1
votes1
answer538
viewsWhat does the Storage folder in the Laravel do?
In the Laravel installation, the Storage folder appears, but I never knew the real function of it. Also common is a folder of the same name in the opencart CMS.
-
-1
votes1
answer76
viewsLaravel order by
I’m having trouble sorting data that are organized as follows: 1 1.1 2.2 2.2.1 2.2.1.1 10 11 The result I have is: 1 1.1 10 11 2.2 2.2.1 2.2.1.1 To order I’m using: Schedule::where(…
-
-1
votes1
answer21
viewsMake a relationship with data already created
I’m working on a school registration system with Alavel. It currently has two tables in the database: the list of Classes and the list of Teachers. When registering a new class, I want to be able to…
-
-1
votes1
answer398
viewsAdd multidimensional array as an array item
I am working with Windows and I am implementing a permissions-based menu, I am recovering the menu data from a table in my database. I created a model and in it I am doing the logic to retrieve the…
-
-1
votes1
answer30
viewsError Call to a Member Function store() on string - image upload error
I’m trying to make a upload of images using the public function create, but when I try to send the form to register the error appears: Error Call to a Member Function store() on string Does anyone…
-
-1
votes1
answer60
viewsParser error in Laravel 5.5
In my view, welcome.blade.php I am getting a parser error in the following HTML snippet: <div class="single_service_left"> <img src="{{ asset('images/flaticon4.png') }}" alt="" />…
-
-1
votes1
answer329
viewsWhat’s the matter with you?
Next, on my model: public function indicacao() { return $this->hasMany(User::class, 'indicacao','name'); } public function todasindicacoes() { return…
-
-1
votes2
answers345
viewsProblems with Laravel Query Builder
I have the following problem, when trying to implement a consultation with joins, in query Builder: My Query (pure SQL): SELECT COUNT(*) as total, orgao.sigla AS sigla_org_uni FROM protocolo INNER…
-
-1
votes2
answers1007
viewsCreate php folder inside another folder
I’m doing maintenance on a project done in Laravel, where the object files is saved in this path ,pdf files C: xamp2 htdocs pmo public projects_files The code snippet where you save the files is…
-
-1
votes1
answer446
viewsHow to update data from an Laravel 5.2 registration?
I’m touching the Laravel a short time, I have name, email and password and wanted to know how to update this data with a form. <div class="container"> <div class="row"> <div…
-
-1
votes1
answer1074
viewsProblem when adding a FOREIGN KEY
Guys I’m having trouble adding a foreign key in Laravel 5.4. Follows the codes of migrations down below: Schema::create('anexos_posts', function (Blueprint $table) { $table->increments('id');…
laravelasked 6 years, 5 months ago Bruno Santos 103 -
-1
votes1
answer280
viewsProblem with validation 'Unique' in Laravel
Hello, I’m starting to learn Laravel, I’m doing a small project and I’m in the validation part, but I’m having problems with validation when I want to validate a unique value (Unique). class…
laravelasked 6 years, 5 months ago Marcos Knopp 21 -
-1
votes1
answer485
viewsLaravel - Insert to database
I’m New in Laravel and I’m trying to insert data to the database but it keeps giving error n I know if I’m doing right as I am doing: $nome=$_POST['nome']; $sobrenome=$_POST['sobrenome'];…
-
-1
votes1
answer280
viewsLaravel - do DB::table() without using Join
I’m playing with Aravel and I’m learning object orientation and I wanted to make a select without using the Join as and object oriented and I know little n I’m getting. as I’m used to using:…
-
-1
votes1
answer337
viewsLaravel helpers do not work in shared hosting production mode
I have an Laravel 5.6 application hosted at Ycorn, there, because it is shared, I do not have SSH access, which makes it difficult to implement the framework. With that, the helpers {{asset()}} and…
-
-1
votes1
answer420
viewsError when typing php Artisan migrate command in windows terminal
Error: after typing the command php artisan migrate in the Windows: Microsoft Windows [version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved. C: Users x538238>cd C: xampp htdocs…
-
-1
votes1
answer898
viewsTranslation error on adminLTE template buttons
I developed a project that uses the adminLTE template and the Laravel Framework. But when migrating the project to the production server the template buttons were disfigured. I need your help to…
-
-1
votes1
answer469
viewsGoogle Charts Timeline using Laravel (PHP)
I have a controller that queries the data, transforms it into JSON and sends it to the view (which contains Timeline). The chart being used is this:…
-
-1
votes1
answer137
viewsWhere in Laravel does not return information
In my Professionalcontroller.php file, I have the code: public function vinculo($id) { $profissional = Profissional::find($id); $unidades = Unidade::all(); $vinculos =…
laravelasked 6 years, 2 months ago Italo Rodrigo 4,344 -
-1
votes1
answer899
viewsLARAVEL - Error when connecting MYSQL with LARADOCK in Workspace
When I try to run the command on the laradock’s Workspace php artisan migrate the following error occurs: Illuminate\Database\QueryException : SQLSTATE[HY000] [2054] The server requested…
-
-1
votes4
answers3789
viewsUse jQuery-Mask with Laravel
I’m trying to use jQuery-Mask with Laravel, but it doesn’t work. If anyone can help :) When I look at the Chrome Console tab it gives the following error: My code is as follows (tag head):…
-
-1
votes2
answers415
viewsauth::Attempt method is not logging in
I’m trying to use the Auth::Attempt method to log in to my api, but it always falls into Else, even when it has in the database the correspondence of that email/password. Where can I set up this…
laravelasked 6 years, 1 month ago veroneseComS 2,752 -
-1
votes1
answer252
viewsProblem of Laravel routes
I’m having a problem with a route of my system. Route::get('/atualizacoes/list', 'AtualizacoesController@listarIndex')->name('atualizacoes.listar'); From what I understand he is interpreting the…
-
-1
votes1
answer27
viewsTake advantage of
I would like to take advantage of the result of a consultation in another function when requested For example: Controller public function funcao1(Request $request){ $myObj = DB::select("SELECT *…
-
-1
votes3
answers1942
viewsError sending email on Laravel 5.7 - Swift_transportexception
Hello, I’m trying to send an email using Laravel 5.7, and I had some problems. I wrote a view for my email. Then I send the email rendered by the Controller, as follows:…
-
-1
votes1
answer370
viewsRoute without token protection asking for token
I am trying to register a new user who is not on the route protected by middleware token jwt, but am getting the Return. { "error": "The token could not be parsed from the request" } Follows…
-
-1
votes1
answer395
viewsI can’t save all records from foreach - LARAVEL
In the user id it has 2 record only that at the time of saving it only saves 1 record and not the 2, as I must do to save correctly ? Follows Code below Controller Lists user data public function…
-
-1
votes2
answers2791
viewsHow to pass Array values in Postman
I am developing an API, and one of the modules is the ACL(access control list) in the Laravel Framework. I came to a problem that I haven’t found plausible solutions yet, which is like testing…
-
-1
votes1
answer139
viewsHow to change the name of the button if user has registered - LARAVEL?
Good evening, I would like to put a notice on the button if user has made such registration in my case have renewed, user enters the card and note that already made the registration the name of the…
-
-1
votes1
answer52
viewsLARAVEL: Checking for SQL returns
I’m in need of some help! I have an SQL query in Laravel as follows: $cliente = DB::table('clientes')->where(DB::raw("cpf = '$cpf' AND (REPLACE(REPLACE(REPLACE(REPLACE(telefone1_num, '(', ''),…
-
-1
votes1
answer106
viewsReturn data from different tables in a view - Laravel (Solved)
Problem solving: In this example, I am returning in the user view, data referring to 2 different tables (Intro, About), which can be retrieved from a @foreach Example: View user.index…
-
-1
votes1
answer30
viewsHow to count line with runquery(Laravel)
$id= $this->id; $consulta = DB::select('select *from locacao where id = ?',[$id]); $consulta->count(); I tried it :(but it didn’t work out the $query->Count(); I only find things related to…