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
answer760
viewsDoubt about the version of the Laravel:
When I installed the Laravel I used the command: "Composer global require Laravel/installer" being carried out the installation of the latest version that is working normal. I want to create a…
-
0
votes0
answers50
viewsLaravel - how to authorize certain action?
I have a small application written with Laravel 5.3, at a certain point I perform a check to see if the logged-in user has permission to edit/change or delete a particular post: if(!$post =…
-
0
votes2
answers1924
viewsDisable the CSRF token of the Standard 5.2
In Laravel 5.2 I want to disable CSRF on a route, because I am using the pagseguro (michaeldouglas/Laravel-pagseguro) and I want to work with the automatic return. I have tried adding the route in…
-
0
votes1
answer41
viewsPaginate Updating Request?
Good morning, I will try to simplify my difficulty, however any extra doubt I will be available to provide any code information... I have a filter whose which I do my searches for certain values and…
-
0
votes1
answer4203
viewsHow do I do this query with subselect in the Laravel?
I tried anyway, but he won’t ride for me SubSelect. I used the method toSql() to confirm and really he does not ride. SQL SELECT p.descr,p.dt_hr, (SELECT u1.name FROM users u1 WHERE u1.id =…
-
0
votes1
answer418
viewsLaravel does not return Belongsto
Opa galera I have two tables one with name Product and another with name Productocategoria. When I go to make the relationship in the models, only the Product object returns the products, the…
-
0
votes2
answers4889
viewsLaravel - How to recover the values of a form and redirect using the Route class?
I am studying Laravel and at the moment I am trying to understand how to send values of forms to be recovered and then redirect to a specific page. I’m still starting with Laravel and I don’t even…
-
0
votes1
answer189
viewsAngular js Reload
Person, I noticed that whenever I give Reload on the page, while page is being loaded, it shows all the keys {{}} of scopes of my project, is it normal ? the page containing the scopes coming from a…
-
0
votes1
answer4816
viewsHow to change the width of a native bootstrap navbar?
Good morning. I need to change the width of a native navbar. I simply took the site boostrap.com and pasted it in my template.blade.php but it’s occupying the whole screen and I need to reduce its…
-
0
votes0
answers248
viewsPlace a site with Laravel on AWS EC2
Good am new in this type of environment I need to put an online website in Amazon Web Service EC2 but I’m not getting. I tried to change the document 000-default.conf to the folder /www/public which…
-
0
votes2
answers481
viewsXmlhttprequest (Ionic + Laravel) error
Good morning! I am developing a hybrid application using Ionic, when I try to send a post to my server (Windows) error occurs below: Xmlhttprequest cannot load…
-
0
votes1
answer68
viewsLaravel returns Incorrect table Definition;
When running migrate here, the Variable is returning: Incorrect table Definition; there can be only one auto column and it must be defined as a key. Attached is the code I’m using to create…
-
0
votes0
answers129
viewsTime logged into the system with Laravel 4.2
Good morning. I wonder if Láravel 4.2 has any functionality that tells me how long the user was logged into the system? For example, when the user undoes, I save in the bank that time. When the user…
-
0
votes0
answers52
viewsErrorexception rmdir(/tmp/): Permission denied Laravel
I’m using the class Mail of Laravel and send the e-mail via SMTP right, but shows an error. Errorexception rmdir(/tmp/): Permission denied I’ve already given the folder full permission tmp of the…
-
0
votes1
answer188
viewsUpdate with hasMany relationship for two inputs at the same time in Windows
Well the problem that happens is this, have in my application the phone field that is present in a relationship for personFisica then a person has a hasMany relationship for phones and that in turn…
-
0
votes2
answers294
viewsSnappy does not render image in pdf?
I’m using Snappy to generate reports, but it’s not rendering the image I upload in my html, which I wonder if it might be? Code: Route::get('/report', function(){ $pdf =…
-
0
votes2
answers1153
viewsLaravel Relationship 5.2 Eloquent
Good morning, everyone, I’m having a problem in a relationship between tables with Elouquent (Laravel) I have two tables [clients / activities_commercial] (innoDB MYSQL) In the client table there is…
-
0
votes1
answer1256
viewsConfirm exclusion in Laravel 5.4
i have the form below, in which a button deletes the record of the current line. <form class="form-inline" method="POST" action="/servidores/{{ $serve->id }}"> {{ method_field('DELETE') }}…
-
0
votes1
answer40
viewsRun Migrations from another BD
I copied the Migrations from another comic to mine. Inside the database/Migrations. What command do I use in the terminal to run them one by one, that is, individually ?…
-
0
votes2
answers614
viewsRequest in the url with Laravel
I’m trying to get started on Laravel, and I’m having trouble with requests, when I make just one request as an example localhost:8000/hoteis everything works it searches the page and works…
-
0
votes1
answer335
viewsHow to work with Resource on Laravel?
My question is basically the actions/actions Store, Update and Destroy. I want to create a new record in the database, I must use the verb POST to call the action store? I want to update an existing…
laravelasked 7 years, 8 months ago Fábio Jânio 3,407 -
0
votes1
answer688
viewsHow to configure Laravel’s Auth.Basic to accept another authentication field?
I’m using the Laravel 5 and I want to use the middleware auth.basic. But in my database, the table used for authentication (usuarios), doesn’t have the field email, and yes username - the standard…
-
0
votes1
answer225
viewsWhat are the "partials" folders in Laravel?
In Laravel there are "partials" folders that is a convention? What should I save in these folders? PS: I’m starting in the Laravel world!
-
0
votes0
answers297
viewsRequest select returning null value
Good afternoon, I’m having trouble getting the value of a select in the following form: {{Form::open(array('action' => 'FilterController@EstatisticaEsic', 'class' => 'form-filter'))}} <div…
-
0
votes1
answer225
viewsAdd items within an array to later save
Hello, I have the following situation and would like a hint if possible how would be the logic to implement this procedure in my application PHP Laravel. I’m creating a stock system, in the drive…
-
0
votes0
answers50
viewsProject using Laravel and Mysql
Hello, I’m doing a registration project and I’m stuck in a business. I have a Users table in Mysql where I have a column called 'Status' (default), that is, an administrator can 'enable' or…
-
0
votes2
answers798
viewsHow to create a scheduled task
Guys I’m trying to work with cron for the first time and trying to create a very simple scheduled task. was looking at the documentation and saw that this command needs to be executed * * * * * php…
-
0
votes0
answers338
viewsLaravel Query Builder returning duplicate values?
I have the following problem, I have a select using leftJoin, more is returning duplicate records, the bank is not duplicated and when shooting the leftJoin works. Follows SQL Tabela processo…
-
0
votes1
answer80
viewsError sending email form
I am with the following problem I made a form of sending email but it gives an error follows the image of the error and the code Obs: I am using Laravel THE HTML: <div class="col-md-6 block light…
-
0
votes0
answers55
viewsRelationship with Lucerne
I am trying to create a relationship with the tables of my database using Windows, but with a certain difficulty in logic. I have the tables; content, client and user A user may have several client…
-
0
votes1
answer1369
viewsCSS does not load according to the route in the Standard
I have a Blade file in which it is my base layout (which will be loaded on all pages). But according to what I set the route, the css of this page does not load. Ex.: if my route is like this:…
-
0
votes2
answers452
viewsHow to make an if/Else within a route?
I have a form that has two types of users: administrators and developers and each one has its post login page, but even logged in as an administrator, I can go to the developer pages. I need to fix…
-
0
votes1
answer80
viewsPHP Fatal error: bytes exhausted After running query
Hello, in a certain process of my code I need to execute a query that returns me 4500 rows from the database return Property::whereHas('portals', function ($query) { $query->where('portal_id',…
-
0
votes1
answer104
viewsRemove return json relationship from Laravel’s Datatables package
I have the following code snippet using Standard and the Datatables package $products = Product::with('enterprise') ->select(['id', 'enterprise_id', 'name']) ->whereIn('enterprise_id', [1,…
-
0
votes1
answer130
viewsUpdate a record with a single field
I’m using the L5-Repository in my project, but I’m having the following difficulty: I have the code below to make the Slug is unique, but when I update it says Slug already exists, when in fact it…
-
0
votes1
answer180
viewsSelect Laravel Collective does not select value
I’m trying to recover the value set in the bank and it stay selected in the edit form. The value 2 is coming up to the form but I’m not getting it selected. {!! Form::label('cupUnic', 'Único?') !!}…
-
0
votes1
answer592
viewsHow do I log into the AUTH (Laravel) with data from a third-party API ?
I am developing a news application in Laravel 5 for a client, but it already has a system in operation, and wants me to use the existing database so that system users can log in to the news app and…
-
0
votes1
answer53
viewsForm sending email and exiting session
I created a form with Laravel. My website and onepage however when I send my form the page back to home session I would like it to stay in the contact session this is possible? Follows my code: The…
-
0
votes4
answers1103
viewsUpdate with Laravel does not take model id
I am trying to perform a simple function to change the password of the logged in user using the code: $user = User::find(\Auth::user()->idusuario); $user->password =…
-
0
votes0
answers119
viewsPull logged in user information without using Auth::user()
I have an application developed with Laravel that has some small. php files in the public folder that are loaded in a certain view. I need to pull user information logged in in these files, but I…
-
0
votes1
answer395
viewsLinux commands through Laravel
I’m creating some custom commands in Laravel as per the documentation: https://laravel.com/docs/5.4/artisan ex: php artisan gestao:config This command allows me to automatically configure some…
-
0
votes2
answers345
viewsResults per logged-in user id
have a users table with primary_key id and I have a people table with a user field I want to understand how to use the relationship of the Laravel for these tables and want to search the person with…
-
0
votes0
answers262
viewsHow to check in the API if a user being searched in the database is the user who is logged in?
I am using Laravel and I need to create an attribute (is_me) in the model to know if the current profile belongs to the user who is logged in; I was doing as below, but now that I am using API I can…
-
0
votes1
answer568
viewsProblem sending emails with Laravel 5.4
I am trying to email the Laravel Mail class as follows. Code: Mail::send('companies.emails.register', ['company' => $company], function ($m) use ($company) { $m->to($company->email,…
-
0
votes0
answers26
viewsDoubt about the cache in Laravel
I worked with php a few years ago and used Code Igniter, in it I remember that there was a problem. When two people logged into the site and their computers were on the same network, the system…
laravelasked 7 years, 5 months ago Guilherme Almeida 71 -
0
votes0
answers97
viewsLaravel on dedicated server
I’m trying to install the laravel in a subfolder within public_html, inside the folder where the application is .htaccess. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_URI}…
-
0
votes1
answer701
viewsLaravel does not carry Visual part
When I enter my host location (http://localhost/project/public/login) the page is loaded but the design is not, thus. NOTE: I just put php Artisan make: auth nothing else…
-
0
votes1
answer1469
viewsConfigure Template(ready) in Laravel 5.x
I’m relatively new to developing with Laravel. I bought a template(bootstrap) for my system but do not know how to configure it to work frontend of my application. I’ve tried some tutorials that…
-
0
votes1
answer262
viewsWhere to process data in an MVC project
I’m using Laravel as an example. In the Controller i do 2 searches. public function index() { $page_title = "Relatório"; $projetos = Projetos::orderBy('alguma_coluna')->get(); $subprojetos =…
-
0
votes2
answers421
viewsConvert and save time to database with PHP
I have an input field where the user type an hour (eg "08:00") convert this string with strtotime() and convert again with date() and saved in mysql in TIME format. So far, so good, although I think…