Most voted "laravel-5" questions
Laravel is an open-source framework for developing web applications and services with PHP. Use this tag for specific questions about Laravel 5 or later.
Learn more…751 questions
Sort by count of
-
1
votes2
answers124
viewsRollback problems on Laravel 5.5
I am importing/migrating an old database from my site to a new format. I am using Transactions in this import as per the code below. The problem is that when I get an error the rollback is not being…
-
1
votes1
answer576
viewsRedirect after update Readable
I’m working on a project with Laravel and I came across a problem. After Update I want to redirect the user to another specific page. In the update function of my Controller I have this code: public…
-
1
votes1
answer218
viewsMethodnotallowedhttpexception($others) Laravel Send form via Ajax
I have a simple form and I am sending it to the controller by Ajax, but my problem is that after clicking the Submit button it does not call the Ajax request in my Jquery and already forwards…
-
1
votes2
answers242
viewsConsultations in Laravel
I’m trying to run a query on Laravel, in the terminal works perfectly, but when I insert in the Laravel, the same returns me empty, example: Consultation: SELECT MAX(positions.id), devices.name,…
-
1
votes1
answer328
viewsLaravel Validator require
When placing the option required in the validation rules of Laravel $validator=\Validator::make($request->all(),['po_bairro'=>'require|string|min:5|max:50']); it requires you to have the value…
-
1
votes1
answer100
viewsWhat about the php view.blade.that loads the data into a Carousel bootstrap?
I am trying to load the data dynamically from a mysql database, to a Carousel bootstrap, with Laravel 5.3. The following is happening: The data is loaded, but Carousel does not work, that is, it is…
-
1
votes0
answers39
viewsHow to add a data insertion interval in the database with Laravel?
I am having the following problem, any button in my project that leads the user to insert some information in the database, if it is pressed several times quickly (without giving time for the page…
-
1
votes0
answers43
viewsRelationship no Laravel
Speak guys, I’m starting to use the Standard and I’m having a problem selecting some data. I have the following tables: users, jobs, projects, job_user. The list of users and jobs is of many to many…
-
1
votes1
answer256
viewsAccess Json Multidimensional PHP/Laravel
I am trying to access a multidimensional Json via Windows and I am not getting the expected result, I need to access phases->games->data->2017-05-13 I will post the code below to find a…
-
1
votes0
answers386
viewsAjax search with Laravel 5.6 and jquery
I’m having trouble executing an ajax search with Laravel, follow the ajax code of my view: $(document).ready(function () { $('#enviarForm').click(function (e) { e.preventDefault(); var form =…
-
1
votes1
answer696
viewsRedirect after login Standard 5.5
Good morning, I’m using Laravel’s standard authentication scafold, and repurposing the structure by overriding the methods I need for you to behave the way I want you to. I customized the default…
-
1
votes1
answer173
viewsI can not get the data of who is logged
I have a question, I would like to recover the data that is logged in without having to go through the view, and use them in any view, so I decided to do in the controller __construct The more the…
laravel-5asked 6 years, 3 months ago mauricio macedo 11 -
1
votes0
answers436
viewsError adding Constraint (General error 1215) - Orange
I am trying to create two related tables. When trying to 'migrate' them, the error is returned: "SQLSTATE[HY000]: General error: 1215 Cannot add Foreign key Constraint (SQL: alter table 'Companies'…
-
1
votes1
answer136
viewsRedirect fault Laravel
Expensive, Can you help me with this portable redirect? I created a method where it re-evaluates the data and redirects, on the other hand when redirecting I get the Route error…
laravel laravel-5 laravel-eloquent laravel-blade redirectasked 6 years, 2 months ago Ronaldo Adriano 61 -
1
votes1
answer1557
viewsUndefined offset 0 - Laravel
I have a list of users, each user has their 'role' (role/function within the system, such as 'user' and 'admin') and this role has to be shown on the user listing screen, which I did using the code…
-
1
votes1
answer54
viewsHow to use "request" in the following situation
I have two methods in Controller that has the function of saving a new check and another that updates the check with edit. The two methods go through Request before entering into the bank, but…
-
1
votes2
answers395
viewsKnow if at least one checkbox is selected within an array of the Laravel
I have an array of the Laravel that renders checkboxes: @foreach($images as $img) <div class="col-md-3"> <img src="{{url('gallery_images')}}/{{ $img->image }}" class="img-thumbnail"…
-
1
votes1
answer491
viewsValidate CPF in Laravel’s Registercontroller class
I downloaded the package https://github.com/LaravelLegends/pt-br-validator to perform Cpf validation on my system. I followed the documentation instructions by putting Validatorprovider in the…
-
1
votes1
answer81
viewsDo I need to return the client’s name in the View orders?
I am beginner with the Laravel need to return the name of the client in the View orders, at the moment is only getting the ID Classes class Ordem extends Model { protected $fillable…
laravel-5asked 6 years ago Roni Cardoso 13 -
1
votes1
answer53
viewsSearch and bring id from another table
The search field for the problem is working, but I would like to search for the customer name as they are related. controller search method public function busca(OrdemRequest $request) { $problema =…
-
1
votes0
answers73
viewshow to handle a multiple file upload request and [Object Filelist]?
I’m trying to upload multiple files, but the request is sending a string: [Object Filelist] <file class="btn btn-default" name="fotos_empreendimento" accept=".jpeg,.png,.gif"…
-
1
votes3
answers1141
viewsLaravel - How to Page and Give Order By
I have that code: $modeloVideo = ModeloVideo::paginate(10); I want to page for 10 and display order by desc (descending order). How to do this query? I tried so : <?php namespace…
-
1
votes1
answer47
viewsUPDATE VIA CSV LARAVEL
I have this parameter to import data via CSV and I want to know how to create the UPDATE function based on the CODE field. public function importEstoque(Request $request) { $validator =…
-
1
votes1
answer218
viewsJquery Clear array when making new request
In the view I have a input select which event onchange I run a call on ajax for a given route that searches all items of a Model. <select required onchange="getQuestions()"…
-
1
votes1
answer248
viewsLaravel 5.1 access cookie generated in middleware before being redirected to view
In my application I have an authentication system with token_ and refreshtoken_ and I have a middleware to verify that the user is logged in and to renew their token_ if it is expired. After I renew…
-
1
votes1
answer152
viewsView related table information - Laravel?
I’m starting to mess with Laravel(5.7) and I’m having a little trouble. I have two tables, product and category, being that one category can be of various products, and the product only of one…
-
1
votes1
answer205
viewsIntermediate relationship between two Laravel tables
Good evening I have the following tables in my application. Doacao -id -nome -doador_id Instituicao -id -nome Doador -id -nome I need to carry out the relationship, in a third table among the…
-
1
votes1
answer124
viewsLaravel - Inserting & Updating Related Models
in the Laravel documentation it teaches how to do Insert on related models. Here is an example of how to do it in the documentation: Inserting & Updating Related Models $comment = new…
-
1
votes0
answers45
viewsHow to make relationship using the result of a relationship with Eloquent
I’m having trouble making the relationship between the table produtos, opções and tipos de opções on Laravel, I can bring the products and their options using Product::with('options')->get(), but…
-
1
votes1
answer404
viewsWhat function and how to use Controllers in Laravel
I’m learning Laravel by a channel, and left me doubt... How should I create my Controllers? As far as I understand it, the view asks for it, the controller will validate and successfully calls the…
-
1
votes1
answer98
viewsLaravel - Database - unique data only from the logged-in user id
I’m having a problem in Laravel, in checking the unique data, I want you to check whether data is unique only in user id. I have a table called empresas_cadastradas, and what I want you to do is for…
-
1
votes1
answer450
viewsHow to do a like research in Aravel 5.5 using eloquent relationship?
I need to do a survey using like in a model that has relationship with another table(equipment). What has happened is that it is bringing all the records of the ordemservic table with the null…
-
1
votes1
answer261
viewsReturn database search with Controller
I’m trying to take the content name of an input from my search page (Search), and send it to another view (Data), where the controller will receive this value and from there will search the database…
-
1
votes1
answer42
viewsLaravel:I can’t Download a file
I have tried several tutorials and researched similar problems here in stack,but without success ,previously I took the id of the file and it was passed as parameter and did not return anything.Now…
-
1
votes0
answers41
viewsPusherexception SHA256 appears to be Unsupported how to resolve?
I am implementing in the system the websocket technology, where we use the Laravel-echo-server along with Pusher, the process to open the channel and trigger events is working normally. But from…
-
1
votes1
answer331
viewsValidate non-mandatory fields using Laravel Validation 5.8
I would like to validate a field and make that field not mandatory. I know that for him to be obligatory I must wear required but I didn’t use it, since I only wanted to validate an email if it was…
-
1
votes1
answer3143
viewsWhat to do to call a function from another controller in Laravel? I would like to implement best practice
I have a boletosController controller need to call the Function create in the tradeController; boletosController.php; namespace App\Http\Controllers; use App\Repositorios\Boletos; use…
-
1
votes0
answers651
viewsCurl error 60: SSL Certificate problem: self Signed Certificate in Certificate chain (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
I’m trying to accomplish a WebScraping, however I am getting the following error as return: Curl error 60: SSL Certificate problem: self Signed Certificate in Certificate chain (see…
-
1
votes0
answers68
viewsLaravel 5.6 Existing Controller not found
I have a ProdutoController inside App\Http\Controllers, but when I try to access the screen that makes use, gives error saying that the controller was not found. ReflectionException (-1) Class…
-
1
votes1
answer83
viewsMigration in more than one bank
I need to turn the remote php artisan migrate and each Migration go to your respective database, I have the following code on .env: DB_CONNECTION=mysql DB_HOST=163.25.138.18 DB_PORT=3306…
-
1
votes1
answer487
viewsProblem uploading images to Laravel 6 with Ajax
Currently I did a mini file upload project using the Asynchronous File Uploader (Ajax) and it worked. I went to try to upload images using ajax and my request is returning null, so I can not…
-
1
votes0
answers82
viewsMysql usage with Laravel and table items records are disappearing what might be?
I have a mysql 5.7.29 database called "base_default" with collation and encoding according to the image below and the api uses Laravel 5.6. on this basis I have the following table structure: data…
-
0
votes1
answer99
viewsUpload images in the form
I have a form that needs to upload two images in the same form and that should be posted in different folders, anyone have any tips ?? Thanks
-
0
votes1
answer2486
viewsLaravel and the MVC concept - where do I put my classes/functions?
Hello. I’m new to Laravel and MVC architecture and I have a conceptual doubt. In my bank I have a code(string), for example "[paragraph]". I will transform this string into "< p>meu…
-
0
votes1
answer532
viewsDefault field to select in Illuminate/html
I have a problem and I have already searched the internet for the solution. Unsuccessful! I have a form and inside it, a select filled automatically: {!! Form::select('categoria_id', $categorias,…
-
0
votes1
answer136
viewsHow to implement multiple authentication drivers
I am building a system where it is necessary to have two types of authentication, the first referring to ordinary users, who will access the front of the store, and the second for administrators,…
-
0
votes1
answer364
viewsCommand Laravel
I have a Queue class in Laravel 5.1 that does an insertion in mysql through a csv, but I can’t use Session in this class and I can’t even get the id of the user logged in by oauth 2. How can I do…
-
0
votes0
answers51
viewsRotate Laravel site 5 on Locaweb
Staff need to run a Laravel 5.1 site on a shared hosting on Locaweb. Before any comments really need to be on the customer’s Locaweb and requirement. The root folder is public_html already tried to…
laravel-5asked 9 years, 1 month ago Joao Nivaldo 1,229 -
0
votes1
answer426
viewsHow to reconfigure APP_KEY from an Laravel 5.1 application
Today I restored my Macbook Pro because I had some incompatibilities with the El Capitan (beta). During this process I forgot to backup the file .env of my project, so I could no longer login to the…
-
0
votes0
answers724
viewsWamp + Laravel 5.1 + Postgresql
Someone already set up Laravel 5.1 to run on Wamp using postgresql database? I have an Laravel installation running on a WAMP server, but when running the "php Artisan migrate" command I get the…