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
votes2
answers4266
viewsLaravel Insert data into a table and use the same id to fill another
I am starting in Laravel and I have a problem related to inserting data in two tables of mysql... explaining better would be the following: I have a table called questionnaires where I have only ID…
-
0
votes1
answer39
viewsDate formatting problem Standard 5.5
I am trying to solve a date formatting issue before sending to database but am not succeeding! I am using in a form the plugin datapicker, as shown in the image below: In my Controller I have this…
-
0
votes1
answer493
viewsPlace auth folder in subfolder (Laravel)
I’m new in Laravel and in my project I want to put the auth view folder inside the admin folder, getting like this: C:\xampp\htdocs\projeto\resources\views\admin\auth\ However, I know I must still…
-
0
votes0
answers47
viewsApply rates according to the number of books sold
I have the following problem: A publisher pays x% to the author and it has several levels. If the author sells up to 1000unid books he receives 10% of the sale. Between 1000unid and 5000unid…
-
0
votes1
answer862
viewsHow to run php Artisan migrate on the web server
I passed the project of Laravel 5.4 for hosting, but now I do not know a way to use the php Artisan migrate to create my tables in the database. I created a file in the public folder named after…
-
0
votes2
answers496
viewsUpload webp images
I would like to do something similar to the link below with the images of my site, using the webp format: example on this site When I try to save the image by this link, by Chrome, it saves in webp…
-
0
votes1
answer457
viewsDeploy in Laravel Projects
Hello! After a project is done in Laravel, which folders and files are really useful for uploading to the server? Actually I use everything and I think it’s kind of heavy.
-
0
votes0
answers496
viewsLaravel - Redirect::to or Redirect::back giving Tokenmismatchexception error?
The following is happening, I have the login screen that does some checks, in case you do not pass any in my Controller I make a redirect for url login message with the error. This is where the…
-
0
votes0
answers77
viewsWith do Eloquent is not bringing any value
I am using Laravel 5.2, I am trying to make a 'Join' n to m with the 'With' of 'Eloquent' but it does not return any value, even if they exist in the database. Class Pessoa: class Pessoa extends…
-
0
votes1
answer221
viewsAuthentication auth Standard
Good morning guys, I decided to disable users, now I would like to know how I can allow only enabled user login, in the table users I added a column called disable, if the user disable is false…
laravelasked 6 years, 9 months ago Bruno Santos 103 -
0
votes1
answer89
viewsIs it possible to connect my Laravel app with Vue or Angular?
I started a project that will have an application in the future Vue or Angular. My question is whether it is possible to make this link between the system and the application and whether this "link"…
-
0
votes1
answer1180
viewsLaravel Invalidargumentexception
People can help me with this error... Invalidargumentexception in Routeregistrar.php line 75: Attribute [when] does not exist. I’m learning Laravel and this mistake this boring. Follow Route(web)…
-
0
votes2
answers274
viewsReturn of Collection after Update
By default Laravel returns true or false when doing an update. Example: User::find(1)->update(['name'=> 'David']); The return of this will be a true or false, making me need to do another Find…
laravelasked 6 years, 8 months ago David Dias 995 -
0
votes1
answer892
viewsRedirect to external link in Laravel
How can I redirect out of my Laravel website? I tried it with Redirect::away() but it didn’t work. I saw some solutions with javascript but I wanted to look for other ways.…
-
0
votes0
answers80
viewsIdentify and list which users viewed an Laravel post
Good afternoon, for study purposes, I am creating a communication system, where users register communiqués on a timeline, but I came across the following question, How would I show which users…
-
0
votes1
answer444
viewsAdd field to standard registration form of Laravel 5.3
Good afternoon, I want to add the type field to the user of a system in Laravel and am doing as follows: Migration public function up() { Schema::create('users', function (Blueprint $table) {…
-
0
votes0
answers18
viewsCollapsibles do not work
I’m wearing a framework called SBAdmin, which is nothing more than Bootstrap 4. But by creating the same collapsible that FW provides as an example it does not work in certain cases, The error is in…
-
0
votes1
answer277
viewsLaravel Defender Trying to get Property 'name' of non-object
Is returning the following error of my assignment: $user->attachRole(12); Observing: if I use this way parameterized the normal functional defender models $user->roles()->attach(12); What…
-
0
votes2
answers387
views -
0
votes1
answer1006
viewsHow to pass data from two tables in one View?
I’m trying to pass data from two tables(SQL) in a table structure HTML. When I try to pass to mine View, the Laravel does not recognise the relationship method. View - atualizador.blade.php…
-
0
votes1
answer402
viewsHow to return data array with Join in Laravel with the DB class?
I need some help with that SQL of Laravel: $process = $db->table('processo')->where('nrprocesso',$id) ->leftJoin('viatransporte', function($viatransporte){…
-
0
votes1
answer46
viewsHow to format field names in the output of Laravel validation messages?
I’m using $this->validate() to perform field validation in Laravel, how can I apply an underscore in the name of the fields automatically in the output of all messages referring to validation…
laravelasked 6 years, 8 months ago Fábio Jânio 3,407 -
0
votes1
answer674
viewsPHP Artisan Migrate Error
I am having the following error while executing the command. In Connection.php line 647: SQLSTATE[HY000] [1049] Unknown database 'localhost' (SQL: select * from information_schema.Tables Where…
-
0
votes0
answers213
viewsHelp to format date in Adobe Format
I need to format the date to 00-00-0000, the code below is view of the .blade.php <td class="col-sm-2" data-bind="text: created_at"></td> created_at is database field. just to…
laravelasked 6 years, 8 months ago user100984 -
0
votes1
answer816
views -
0
votes1
answer5263
viewsHow to create search filters in Laravel?
I need to create a search system that receives data through inputs, select and checkbox. My form for research: <form class="navbar-form navbar-left" role="search" action="{!! url('/pesquisar')…
-
0
votes1
answer36
viewsWarning when calling orderby method statically
In the Phpstorm interface is displayed a warning message stating that I am calling the orderby method in a static way, however, this is not static. My call: Artigo::orderBy('edicao',…
-
0
votes1
answer846
viewsVariable recognition problem passed from Laravel to Javascript
I’m developing a web application with Laravel and I noticed something strange. When passing a variable from Laravel to the HTML page two different behaviors are happening: when calling the variable…
-
0
votes1
answer182
viewsRedirect via private method in Laravel
In the Laravel has the helpers redirect that works perfectly within public methods. However in the class I had to divide into two public and one private methods to avoid repeating the authentication…
-
0
votes1
answer71
viewsHow do I assign a view to an Submit input?
I want to assign a link to an input in my code. For example: The view is called 'panel.Blade' and I wanted an input in the 'Adm.Blade' view to return it. Controller class Clientscontroller extends…
-
0
votes1
answer136
viewsHow to make the checkbox 'checked' after saving in the bank?
My checkbox are saving normally, however, when I leave the page and come back, they do not remain checked. Clients.blade.php <body> <form method="POST" action="/user/update/client">…
-
0
votes0
answers387
viewsLaravel | block multiple logins with the same user
I need an idea of how to solve the problem of the same user’s ability to log into several different machines at the same time. Send examples or an idea of where to start looking for the solution.…
-
0
votes1
answer179
viewsLaravel 5.4 (1/1) Tokenmismatchexception
Locally all forms work, but when I put online is giving erro as if I didn’t have the _token attributed to forms. APP_NAME=MonkStudio APP_ENV=production…
-
0
votes1
answer56
viewsStore stylized text on your BD for a news site
I am creating a news and articles site and this site will have a control panel where the Adm will do the CRUD of the news and articles they want to insert on the site. Well, I would like to know the…
-
0
votes0
answers403
viewsHow to have a good identation of . Blade in Vscode?
Example of expected result: <body> @extends('t') @include('as') </body> Example of Reality with PHP extension <body> @extends('t') @include('as') </body>…
-
0
votes1
answer1056
viewsHow do we know where the route came from and redirect it back?
I have 3 tables on BD: Emitentes, Pessoas e Cidades. Where on the table Issuers and in the table People have the FK id_cidade. When I’m registering one, both a Emitente how much a Pessoa I have in…
-
0
votes0
answers91
viewsQueryexception error could not find driver - Laravel - pgsql
This error appears and I can’t fix it. I’ve already decoded php.ini lines. I’ve done everything...(using pgsql)…
-
0
votes2
answers217
viewsIn AJAX only "Fail" is executed, how to solve this problem?
Contextualization When the user presses the button Authorize Documentation the modal will be displayed Authorization that will ask to select the user and enter the password, as shown in the…
-
0
votes1
answer64
viewsHow to Create a Truly Global Scope
It is possible to create global scopes for Models, but even if it is Global, it is still necessary to specify within your Model that it will have this implementation. I want to create a global scope…
laravelasked 6 years, 7 months ago David Dias 995 -
0
votes0
answers82
viewsTASK CRON LARAVEL
I set up the cron to perform scheduled tasks on Laravel and returns the following error: [16-Apr-2018 15:53:02] PHP Warning: Unexpected character in input: '\' (ASCII=92) state=1 in…
laravelasked 6 years, 7 months ago Bruno Santos 103 -
0
votes1
answer598
viewsHow to create entities with composite key in Doctrine?
I have a database that works with composite keys, and I am implementing the use of laravel framework. This is my bank’s structure: I’m using the Doctrine as ORM and discovered that I can not…
-
0
votes0
answers62
viewsException in Collection.php line 1543:
Property [type] does not exist on this Collection instance. I am doing a project in Laravel (5.4) where it is practically ready, however, this error is occurring, because I want the user to click to…
-
0
votes1
answer1909
viewsHow to create Models in Laravel from tables already created in the Mysql database
Good morning guys, I have a question in Laravel, I had a database created in Mysql and use Xethron/Migrations-Generator to create the Migrations from the tables created in the database, but how can…
laravelasked 6 years, 7 months ago Daywison Ferreira Leal 167 -
0
votes1
answer533
viewsLaravel - can you just backend first?
I am learning Arabic and I can already do a few things (work with routes, Migrations, eloquent, controllers, etc). However, I keep bumping my head with the front, because I don’t know the best way…
-
0
votes1
answer47
viewsadd select field dynamically (Laravel project)
I am creating a form of a repository and I have several fields like this modality. What I don’t know how to do is create a function so that when a person clicks on the + button next to the select,…
-
0
votes0
answers120
viewsLaravel works on "localhost" but on production server does not work
I have a problem in my system so that when publishing it in Xamp on my server, accessing locally (on this same server) all the css and js are loaded correctly, but when accessing from another…
-
0
votes1
answer620
viewsCan’t find the php controller with Laravel
Hello guys I’m starting with the Standard, I’ve come across a problem. I created the controller, the routes, but even so, it’s giving me the following error: Class App Http Controllers…
-
0
votes1
answer1670
viewsLaravel only informs current date
Hello, I’m informing on Construct of my entity the date as follows: Entity: public function __construct($fornecedor, $emissao, $vencimento) { $this->fornecedor = $fornecedor; $this->emissao =…
-
0
votes1
answer29
viewsDifficulty recovering data from a link in Laravel
I am developing an application with the Laravel framework along with the instagram api and I have reached an impasse: in a given routine, I get a redirect that returns the login to my application,…
-
0
votes1
answer448
viewsDatatables server-side Processing with Sweet Alert 2
I am using Datatables with server-side Processing and using Sweetalert2 to confirm before deleting the record. Everything is working except the Sweet Alert that is not displayed when clicking the…