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
answer353
viewsAuthentication does not work after running make:auth
I execute the command: SmartFlex> php artisan migrate within my project and it is finished correctly. The options of login and registration are available at view, but while trying to access the…
-
0
votes1
answer371
viewsHow to access the property in a PHP object
When I gave this command echo $user->cards appeared this: [{"id":10,"id_user":2,"id_card":"11222","created_at":null,"updated_at":null,"deleted_at":null}] How to access the deleted_at property of…
-
0
votes2
answers36
viewsWhy isn’t my view presenting the css design?
<html> <head> <link href="/css/app.css" rel="stylesheet"> <title>Controle de estoque</title> </head> <body> <h1>Listagem de…
-
0
votes0
answers285
viewsHow to get the latitude and longitude values of the Google Maps Autocomplete example?
I’m using this example in the Lavarel form: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform?hl=pt-br Works well, I do the fields autocomplete,…
-
0
votes0
answers37
viewsError php Grab Column Database
The name of my column in the database is DATA PASSAGE (with this space between words), when I try to access by the html of the error below: I’m in doubt, how can I make php identify this space…
-
0
votes0
answers419
viewsProblem submitting form with Standard 5.2?
I developed a website in Laravel that presents a problem in the form because it simply does not work and displays no error on the screen it simply has no action and the strange thing is that…
-
0
votes2
answers133
viewsCatch last grouped Mysql record per year
I have the following table I need to return only the last record of the teaching stage ordered by academic year, using Laravel/Mysql Example: 2002 - 15 / 2004 - 16 I’m trying to: $carga_horaria =…
-
0
votes0
answers64
viewsBroken image in Laravel 5.6 [Homestead]
I uploaded an image to my application when using php Artisan serves, today I am using the Homestead, when I went to look the application barred my url and does not let be displayed. <img…
-
0
votes2
answers360
viewsConvert the date format of an array to Laravel/PHP
How to convert Indice [date_start] to 2018-08-23 12:19 format with php or Laravel ? Array ( [id_restaurant] => 303 [date_start] => 23/08/2018 12:19 [date_end] => 27/08/2018 12:19 )…
-
0
votes1
answer43
viewsPrint output of CRON in the terminal - Laravel
I created a CRON on Laravel and wanted to print information on the terminal where the command is running (Ubuntu terminal, in this case). What is the command for this in the Laravel? Example: public…
-
0
votes0
answers76
viewsNotfoundhttpexception error when copying Laravel site
I created a website on a machine and it works fine. I copied the folder to another computer, installed Composer, typed the commands composer update, php artisan migrate and php artisan app:name…
laravelasked 6 years, 1 month ago Italo Rodrigo 4,344 -
0
votes1
answer62
viewsImage minification error with Gulp in Laravel
I am trying to make Gulp minify the images of my project. My project is Laravel 5.3 and I am using lib Laravel-elixir-imagemin Gulp to minify, only when I give the command gulp imagemin appears the…
-
0
votes0
answers36
viewshasMany does not work properly
good night!! I’m trying to launch data report(groups and networks) but it doesn’t work...the group model is like this: function Redes(){ return $this->hasMany('App\rede','grupo_id','id'); } in…
laravelasked 6 years, 1 month ago Horacio Neto 169 -
0
votes1
answer1430
viewsDifficulty with belongsto Laravel 5.6
Good night. I’m doing a project with Laravel and I’m having difficulty in the relationship Could you help me? I have two entities in my bank that are Student and Situation. Student has these…
-
0
votes1
answer235
viewsPHP Laravel Blade {{{ $name or 'Default' }}} Printing 1
According to Laravel’s documentation {{{ $name or 'Default' }}} should behave as if(isset($name)) echo $name else echo 'Default' or echo isset($title) ? $title : 'Default' But it’s coming back 1 as…
-
0
votes1
answer74
viewsAbout Vue project in a specific folder consuming Laravel data via Restfull API
It is possible to / good practice to create a Vue project in a separate Laravel folder so that all authentication and data consumption is done via Laravel’s Restfull API? /Raiz /Front <- Arquivos…
-
0
votes0
answers100
viewsLaravel - plugin to view existing folders and files in Storage->app->public
need a help, someone knows some plugin to show real-time the existing folders and files in Storage>>app>>>public in Laravel? I found this plugin that does what I want: Demo:…
-
0
votes1
answer191
viewsModularize only Views of Laravel
I have the following structure: - resources/ - views - Modulo1 - view01.blade.php - Modulo2 - view01.blade.php However I have a problem, I can not use the directives of Lade without conflict, if I…
-
0
votes1
answer108
viewsGet description of sub-category PHP Laravel Eloquent
Hello, I need to get the description of my parent category, but I can’t get the description in the same select, I can only get the id of the parent category. I have a table with the following…
-
0
votes0
answers81
viewsLaravel puts argument in source? Is there any way to take?
<pre>fonts/vendor/materialize-css/dist/roboto/Roboto-Medium.woff2?1561b424aaef2f704bbd89155b3ce514 65.4 kB [emitted]…
-
0
votes1
answer322
viewsLaravel HTTP ERROR 500 linux
I am a full Noob on Linux, was working normally, and Linux installed some updates that suddenly instead of showing the Laravel error screen, I get the screen. HTTP ERROR 500 In the middle of that I…
-
0
votes2
answers324
viewsLaravel 5.4: Error creating table - Unexpected '(', expecting Identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'
When executing the command php Artisan migrate to create the table in the database, the error appears below: [Symfony\Component\Debug\Exception\FatalThrowableError] Parse error: syntax error,…
-
0
votes1
answer51
viewsEloquent Laravel - Migration and Model
Could someone give me an example of how I do a relationship in Migration and model, where this relationship results in a table with external ids. Example : A resale for having no or n addresses, and…
-
0
votes0
answers23
viewsDifficulty creating custom authentication - Standard
I need to create an authentication system on three levels: user, Therapist and student. At first I have a single table, but I think about creating 3 different tables. the problem is: how and where…
-
0
votes0
answers86
viewsSQLSTATE[HY000] error: General error: 4004 Unicode data in a Unicode-only collation
I have the error above when hosting on Locaweb’s linux server. System was developed in Laravel and the sql server database 2008. SQLSTATE[HY000]: General error: 4004 Unicode data in a Unicode-only…
laravelasked 6 years ago Gustavo Nascimento 1 -
0
votes0
answers206
viewsStrange memory consumption PHP Laravel
All right guys, I’m using Laravel for a project and I’m kind of worried about using memory in some classes. So I decided to do a basic test and discover that a method was consuming a lot of memory…
-
0
votes3
answers149
viewsHow to open a message screen in all the views the user logs in? + Laravel
After logging in, I need to show a message (open a message screen -a modal or in a separate view-) on every page he visits. The message will only stop being shown when it is pressed "No longer show…
-
0
votes1
answer752
viewsLaravel 5.4 and Dompdf - problems?
I’m trying to generate a PDF from a view, and it’s working, however, when I call the route to call the controller, the upload is for several seconds, even minutes to generate the PDF, and download,…
-
0
votes2
answers269
viewsOperator "or" of Blade Laravel does not work
When I try to use the operator "or" in the Blade it processes wrong and the Undefined variable. I’m calling it that: {{ $confirmed or false }} But he’s compiling it like this: <?php echo…
-
0
votes1
answer344
viewsPick up data pivot table Laravel
How can I get the pivot table data using Laravel Eloquent? I need to know which setor_id of users and the group_id linked…
-
0
votes1
answer210
viewsHow to use "break" in Blade template?
I’m developing a Checklist modal where the new protocol data will be registered. Each item attribute will be informed by the user and this information will be recorded in the table…
-
0
votes1
answer107
viewsHow to pick up specific item In the Laravel Blade
How do I pick up a specific item on Laravel Blade? Example: $(document).ready(function(){ var id = 1; $('body').append('{{ $projeto->'+id+'->name}}' }) <body> Deve Aparecer aqui o nome…
-
0
votes1
answer73
viewsLaravel not saved POPUP session
On my page you have 3 login options: E-mail, Facebook and Google. When I log in by email - using Auth::attempt() - everything goes well. In this case I log in for a fancybox and not for a popup.…
-
0
votes0
answers26
viewsParameter by name in the query
I have the following appointment SELECT * FROM myTable WHERE ip = 192.168.1.2 I would like to make a query by sending parameter by name using DB::raw() $dados = DB::raw("SELECT * FROM myTable WHERE…
-
0
votes1
answer368
viewsGoogle maps: map does not render via javascript/jQuery call
I need to embed a map in my project. However, from the API’s own tutorial, I couldn’t get it to work, until I found out the problem was Bootstrap, or Laravel - or both, together. That is, although…
-
0
votes1
answer346
viewsError while trying to Insert into database with Laravel
I’m using the Laravel and I’ve been racking my brain trying to figure out the cause of the following mistake while trying to make a insert: (1/1) Errorexception Illegal offset type in…
-
0
votes1
answer1069
viewsHow to take data from a dynamic HTML table to register?
I have the following situation: I’m trying to log the data from Protocol checklist, but this data is inside a dynamic HTML table, as shown in the following image: When trying to save this data, only…
-
0
votes1
answer37
viewsHow to make a login in Laravel with another login view
I am working as an already populated database, it already has a user and a default admin password. What I want is to authenticate this admin with a login view that I made myself. I’m lost in the…
laravelasked 5 years, 11 months ago Richard Carlos 91 -
0
votes1
answer502
viewsFormat date in format
I have that return and I want to convert so as to save the date in the bank YEAR-MES-DIA $dataOs = date('Y-m-d', strtotime($request->data)); When I print like this dd($dataOs); Sometimes it comes…
-
0
votes1
answer45
viewsServer Confusion Problem for Windows
I migrated my site to the hostgator server and it is not directed to the public folder. Aguem can tell me why this happens?…
-
0
votes0
answers116
viewsHow to resolve error: "Whoops! There was an error." Can I help?
Hello I am developing my first application using the framework Windows and I got a problem at the time of logout. This is what he gives back to me. If anyone has faced similar problems please give…
-
0
votes2
answers649
viewsError while doing relationship with Lockable
Call to Undefined method Illuminate Database Query Builder::belongTo() My Models <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Imovel extends Model { //definindo nome…
-
0
votes1
answer557
viewsDynamic routes for Laravel pages
I want to create a dynamic routing system, without having to code gambiarras. Come on. I have the Routes: Route::group([ 'middleware' => ['web'], 'namespace' =>…
-
0
votes1
answer176
viewsArtisan Laravel linux script
I hired a shared server, which performs scheduled tasks (CRON TABLE) via linux scripts (.sh). How to run a command php Artisan (php artisan enviar:emaildiario) within that linux script? UOL server:…
-
0
votes1
answer290
viewsHow do I solve this problem of method create in Laravel
Well, I have a form that contains an html input of an image. When I send the form to Control, I do the image processing, taking his name and uploading to the image directory. More when I see in the…
-
0
votes1
answer658
viewsLARAVEL: Upload views without refresh from a fixed menu
What is the best way to implement a system in Aravel, where when clicking a menu the views are loaded without refresh of the page, just update the content of "content". How can I implement this…
-
0
votes1
answer626
viewsMethodnotallowedhttpexception error in Laravel
I’m trying to update data, but I get: Symfony Component Httpkernel Exception MethodNotAllowedHttpException My route: Route::put('animalperdido/{id}', 'AnimalPerdidoController@update'); My job:…
-
0
votes1
answer228
viewsHow do I send a bank appointment to a View in the Laravel?
I have a model (table)called Member. I want to do the id count that exists in the bank. I have well managed to do it with Member::Count(?id'). It returns me all pretty the total id that I have on…
-
0
votes1
answer1565
viewsLaravel/Eloquent: How to create a primary key composed of two foreign keys?
I am creating a simple system for school management and I will have a table called 'class students', where the primary key should be composed by the student id and class id, which are foreign keys…
-
0
votes0
answers29
viewsError with when trying to enter information with routes
In api.php have that code: Route::group(['middleware' => 'api'], function() { Route::post('clube/addClube', function(Request $request) { return App\clubes::addClube(['name' => $request ->…