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
-
-2
votes2
answers52
viewsProblem with Vagrant up - Homestead-7 already exists
Dear Friends, I need your help. I am trying to install the Windows using the Master. I followed a step-by-step but could not access index.php, so I decided to do it all over again. But when I give a…
-
-2
votes1
answer81
viewsLumen blocks only one route on CORS, all others work
I have a system that was working, but suddenly it stopped working. Giving error "No 'Access-Control-Allow-Origin' header is present on the requested Resource" Etou using Lumen with…
-
-2
votes2
answers321
viewsHow to recover information from Laravel URL?
I have the following route: # Minha rota para cadastro de pessoas ao escolher um plano Route::get('/cadastrar/{plano}', function($plano = 'silver'){ # Checa se o plano existe if…
-
-2
votes1
answer101
viewsColumn not found using ALIAS in Laravel
I am in trouble when accessing a column in the Windows query Builder, the following code works in Sql Workbench. Vendas::selectRaw('if(faturamento.Codfaturamento is null, vendas.totalvenda,…
-
-2
votes2
answers859
viewsUndefined variable in Laravel 5.7
I’m getting the following error message in my project: Undefined variable: banner (View: C: wamp64 www painelEda Resources views alterar-banner.blade.php) While in my view banner.blade.php is this…
-
-2
votes1
answer77
viewsCount in PHP via variable value
I’m struggling with something relatively simple, but it’s causing me a headache because I always get error. In an application I need to get the amount of open classes coming from the Crud of…
-
-2
votes1
answer95
viewsLaravel - Bring SELECT Component ALREADY SELECTED when editing
I am trying to bring a select already selected according to the information that is recorded in the bank. However I am having a lot of difficulty. I’ll leave the code below. Controler public…
laravelasked 5 years, 11 months ago user9078159 5 -
-2
votes1
answer66
viewsPHP concatenation in the selection field
Follow my question regarding concatenation in PHP in the code below: <td>{{$projeto->situacao_projeto == 'AA' ? 'Aguardando Autorização' : 'AP' ? 'Aprovado' :'CS' ? 'Cancelado Suspenso' :…
-
-2
votes2
answers57
viewsData validation in PHP
I am developing a project which I am using a structure somewhat similar to that of Laravel, this structure allows me to make a CRUD in the whole system using only one class and setting the tables I…
-
-2
votes1
answer223
viewsPhpjasper does not return database data
I’m doing a monthly report of an application with Laravel 5.7, but it’s only returning NULL from the database. I’m using Mysql. Can someone help us? This is my Controller. use…
-
-2
votes2
answers69
viewsLaravel version 5.8 does not come with routers folder?
I installed Laravel on my server (which was uploaded with vangrant and Virtual Box), but did not come the routers folder, which I found very strange, I read through the documentation that it comes…
-
-2
votes1
answer83
viewsLaravel does not generate error while processing form with 'post'
I’m taking a course of Laravel, and in the course the instructor used a form that points nowhere to show a mistake of the type MethodNotAllowedHttpException. Until then, fine, but when processing…
-
-2
votes1
answer23
viewsPick up value by selecting from a combobox and send to a php capo
Comes a product query from the bank, and will be placed in a combobox, I have to display the unit of measure (which is in the same table in the BD) in a text field, after the user select the…
-
-2
votes1
answer287
viewsProblems converting javascript variable to transfer on an Laravel route
I am having trouble passing a Javascript variable into a Laravel route. To do so, I am using an AJAX request. The code I’m using is just below: $.ajax({ url: 'rota/emails/'+p.id, type: "GET", data :…
-
-2
votes1
answer607
viewsWhen called the update method, the Laravel does not recognize the route
I’m beginner with Laravel(5.5) and I have a problem. I created a crud of products, can list it and view the record, but when I try to do an update, it returns an error: Methodnotallowedhttpexception…
-
-2
votes2
answers109
viewsHow to insert a serialize into the database in a string field
Guys, I have an app Laravel and I am needing to insert a value that is going through a first serealize() in PHP in my database in a field string. This is the array $dia_semana =…
-
-2
votes1
answer88
viewsReturn of attributes in Model Laravel
I have an application where subcategories are associated with a category. In the Subcategory Model the relationship between both is performed and the category name is returned through getattribute,…
-
-2
votes1
answer389
viewsGet number of followers on instagram with PHP
I have the following code: $username = 'makeup.pro.br'; $response = @file_get_contents( "https://www.instagram.com/$username/?__a=1" ); if ( $response !== false ) { $data = json_decode( $response,…
-
-2
votes1
answer185
views -
-2
votes1
answer51
viewsModify Paginate in Laravel 5.8
Good night, you guys! I’m developing a tool using Laravel. Maybe I still have to study more to reach a level of knowledge to be able to discuss it better, because I’m not a developer, but thank God…
laravelasked 4 years, 9 months ago Tulio Portela 3 -
-2
votes1
answer487
views -
-2
votes1
answer26
viewsAdd class with Jquery when opening the page
Hello. I’m trying to make a monitoring center for the network computers. Each div will ping to an IP and then return ON or OFF. Then, with Jquery, I assign the value of the PHP variable and, if ON…
-
-2
votes1
answer103
viewsReload only one DIV with Javascript
Hello. I am using LARAVEL. I have a div that displays whether the site is ON or OFF. Using the curl_info function, the url is passed and then the function returns the site status. I would like this…
-
-2
votes1
answer60
viewsdisplay list of dependents per user in Laravel 6
I have my main "home" page with route that is displayed after login. So this one "home.blade.php" displays a page with the logged in user data. I created a "dependent" table, I made the relationship…
-
-2
votes1
answer606
viewsLaravel Database name error seems incorrect how to resolve?
I recently created a Previder service, which kind of works. however when I will capture the database data using Produtos::all(); I get the following error: Database name seems incorrect You’re using…
-
-2
votes1
answer1268
viewsSQLSTATE[42P01]: Undefined table: 7 ERROR: relation
I have a project where I made some Migrations, but when I did I managed to run the Migrations quietly. I recently formatted my computer, installed Postgressql and did my "Restore" from my DB. In…
-
-2
votes2
answers63
viewsHello, I’m trying to search the Laravel, who can help me
I have a Model called Record, This Model has a method like HasOne who is called Item, I’m implementing a search, but here’s the problem. All the methods work normally, the problem is the following,…
-
-2
votes1
answer397
viewsLARAVEL Validation Method PUT
Good morning, you guys. I’m a beginner in Lisbon, I searched on the subject but nothing can help me(or that I have understood), so , who can give me a strength and thank. LARAVEL 5.8…
laravelasked 4 years, 7 months ago Rony Ortega 1 -
-2
votes2
answers465
viewsComposer install does not run
Hello I am facing a problem here in which I am unable to run Composer install and am getting the following error: Error running Composer install Do not run Composer as root/super user! See…
-
-2
votes1
answer134
viewsLaravel 7, several variables in the same View
Good morning, I’m developing a little project on Laravel 7 and I’m having a little trouble. This is the first time I have used Foreign key and several variables in the same Controller and View…
-
-2
votes1
answer71
viewsAdd Laravel resources to an existing project
I’m new in the world PHP and Laravel, but I joined a project that the original team has no contact with and I’m in a demand and I didn’t want to put in CRON the execution of e-mail routines. This…
-
-2
votes1
answer20
viewsDatabase / Laravel
good afternoon, I am trying to create a product in relation to your identified label, for example when sending the form a null line is created in the database. public function store(Produto…
-
-2
votes1
answer19
viewsQuery replaces id of main table
I am trying to perform a query in the table "expenses" that has foreign key. When performing the query. The "id" column of the "expenses" table is replaced by the "id" of "dismisse_categories" I am…
laravelasked 4 years, 4 months ago pecom 6dedos 26 -
-2
votes1
answer73
viewsLaravel Create composite key for pivot table?
I would like to know how it is possible to perform validation in the 6.x Standard for composite keys ? I am wanting to insert new data a pivot table that has many link to many with two other tables.…
-
-2
votes1
answer186
viewsHow to check if the email already exists in "real time"? Laravel
I am building an update form. I want that when the user requests an email exchange, first I check that the email is no longer in use. In my html form I have the following field: <div…
laravelasked 4 years, 2 months ago srosanatalia 19 -
-2
votes1
answer428
viewsHow to call a controller method via JS or Ajax in Windows
I’m new with PHP and Laravel, besides I don’t know much about JS. I have the following question, I have a view that displays the information of the service provider of my project, before this guy is…
-
-2
votes1
answer98
viewsProblem in custom auth 7
I’m trying to set up a custom table for auth in 7.x. Login works normally, but a new user record returns the error: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'Rh.users' doesn’t…
laravelasked 4 years ago Pedro Bonel 13 -
-2
votes1
answer41
viewsRequest Laravel 5
I need to save the values of the variable $result in a session, follow the code. class CorreioController extends Controller { public function calculate(Request $request) { $params = array(…
-
-2
votes1
answer110
viewsAccess files outside public_html
I’m having a hard time with a Portable project, version of the 8.x. I deployed the project outside of public_html and everything of the project that was in the public folder I put inside the…
-
-2
votes1
answer149
viewsHow to redirect from one page to another in Laravel?
I would like to say that I am extremely lay in PHP and Laravel, but I am trying to learn for a job. I’ve done a basic CRUD before with the tool but I have a question on a current project. I created…
-
-2
votes1
answer33
viewsSelection-based field options update with Laravel
From of this article I found an interesting way to create dynamic checkboxes. I was able to adapt it to my case by adding to/web.php routes Route::post('select-ajax',…
php ajax laravel laravel-eloquent html-selectasked 3 years, 8 months ago Tiago Martins Peres 李大仁 236 -
-2
votes1
answer28
viewsHow do the modal pick up foreach values with Laravel?
I need to make the modal show the value of the item that is selected in the foreach, however it is only taking the last value. Follows the code: <div class="row justify-content-center"> @csrf…
laravelasked 3 years, 7 months ago Gabriel da Silva 1 -
-2
votes1
answer26
viewsHow to update an existing field in the database? Laravel
I need to update a field without changing the description, follow the image below. I changed the field TYPE OF SERVICE but I have to keep the same description, how do I do that? NOTE: I am in a…
laravelasked 3 years, 7 months ago Junior Rodrigues 1 -
-2
votes1
answer206
viewsLaravel : Add fields in two tables (Related Tables)
I have a problem in Laravel where I have two related tables. I have a form for Tabela1 (Chapter) and a form for table 2 (documentation) I can add "Chapters" without interfering with the other table.…
-
-2
votes2
answers61
viewsHow to get the value of buttons created through a foreach loop in php/Laravel?
Personal I have an array with sizes of a product, follow the example of the array: And for each size I create a button through a foreach, follows excerpt from the code where I create the buttons:…
-
-2
votes3
answers45
viewsSymfony Component Httpkernel Exception Methodnotallowedhttpexception The PUT method is not supported for this route. Supported methods: GET, HEAD, POS
My Blade <form action="{{route('Update.afiliados', $users->id)}}" method="POST"> @csrf @method('put') <button class="btn btn-block btn-flat btn-primary" method="post"> <span…
-
-2
votes1
answer20
viewsHow to Pass Variable inside the function
In this "Laravel PHP" email sending script I loop for multiple sending. The problem is that I’m not finding the solution to pass the variables "$email" of posts to within the function "Function($m)"…
-
-2
votes0
answers18
viewsRegistering Livewire components for use in another view in Laravel
Hello, I have a Livewire component rendering the full page, but I’m trying to include a component in the middle of the view: <div> <div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">…
laravelasked 3 years, 3 months ago Cesar Fuentes 1 -
-2
votes1
answer23
viewsLaravel - Use JOIN + COUNT
I have two tables, one for users (users) and another for companies (Companies). I need to select the data of each company and know the amount of users per company. This select in mysql works the way…
-
-2
votes0
answers40
viewsProblem with Count() in the Laravel
I need to show the number of records belonging to a registered mobile number. in the log table have the columns NUMBER and MESSAGES need to show the user the amount of messages that the registered…