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
answer965
viewsLaravel 5 Eloquent View Blade with Foreign Key?
I get the following error: Trying to get Property 'name' of non-object I have a list of Suppliers and Payments, and I am using the following syntax to retrieve the Vendor name through the foreign…
-
0
votes1
answer42
viewsLaravel - Return values in master layout
I have an application using Laravel 5.5, arose the need to insert a dynamic field in the footer that is located in the layout master, however, I am not able to return the data in it, I could not…
-
0
votes0
answers175
viewsLaravel - (path to simple changes in documentation)
I have a documentation to modify, but the programmer is professional, as I’m starting, I’m totally lost where to find the documents. For example, index.php has some paths, but when I get to the…
-
0
votes1
answer1574
viewsTrying to get Property 'name' of non-object Laravel Eloquent Error when pulling foreign key data
I am trying to use relationships to show data on screen but I get the following error: Trying to get Property 'name' of non-object In this command…
laravel laravel-eloquent laravel-blade foreign-key modelasked 6 years, 8 months ago Gabriel Alves 41 -
0
votes1
answer102
viewsTransform array records into another multidimensional array
I want to transform this array: array:6 [ 0 => { "saldo": "-257,21" "id_mes": 1 "ano": "2018" } 1 => { "saldo": "-257,21" "id_mes": 2 "ano": "2018" } 2 => { "saldo": "0" "id_mes": 1 "ano":…
-
0
votes0
answers86
views -
0
votes0
answers34
viewsEmpty Line Problem - Laravel
I have a problem, I have a few months of experience in Laravel and I did not see this kind of problem happen, when submitting a form appears the following error: Error Exception Trying to get…
-
0
votes1
answer308
viewsType error: Argument 1 passed to: hasPermission() must be an instance of: Permission string Given
I am stuck in an error here in Laravel and I don’t understand why it is occurring, the message itself I understood, that I am passing as parameter to the function a value that is string when it…
-
0
votes1
answer43
viewsProblem when deleting relational data
Gale need to delete data in cascade, by deleting the record from table users is not deleting data from table documents Migration users: Schema::create('users', function (Blueprint $table) {…
laravelasked 6 years, 8 months ago Bruno Santos 103 -
0
votes1
answer909
viewsHow to use Emit and computed/watch
I am new to Vuejs and started to develop a project to study a spreadsheet launching hours and calculation of hours worked. I am using in the Laravel 5.5 project with Vuejs 2 and Momentjs to…
-
0
votes1
answer213
viewsLaravel 5.5 link with Ancora
I have the route below that redirects to the main page of my site.. Route::group(['prefix' =>'site', 'namespace' => 'site'], function(){ Route::get('/',…
-
0
votes0
answers21
viewsCreation of multiple zip files
I’m having a problem in PHP/Laravel to create multiple zip files synchronously, I copy all commands that are generated and run in Shell, it performs beauty, but when step to PHP run only generates…
-
0
votes2
answers718
viewsUser does not authenticate Auth
I can’t get the user authenticated, so he enters my route with middleware auth... I can log in but I can’t get the user logged in, for example I can’t enter any route with middleware auth and nen…
-
0
votes0
answers99
viewsHow do I make a list nested via json with Aravel?
I’m trying to make a nested list via json, with the Aravel, example, the companies table, has several products each company, I want when I click on a particular company, appear the registered…
-
0
votes1
answer490
viewsAuthentication with 3 Json Web Token (JWT) parameters?
I am doing a login system with Laravel using JWT, however I need to pass 3 parameters, being them an identifier, user and password. I can get those parameters, but I can’t authenticate with the…
-
0
votes1
answer42
viewsScheduler Laravel 5.2
Good evening. I use the Scheduler of Laravel 5.2 for sending emails and now I have a problem. Until Friday I could send the emails with subscription in img normally, but on Friday night we migrate…
-
0
votes2
answers38
viewsError in customizing the default user registration Laravel Auth
Error after registering and redirecting PS: he makes the registration normally, and I can access normally, but always give this error! I made a modification only in the user register, I…
-
0
votes0
answers125
viewsIframe shows system on localhost - PHP
Good morning I’ll try to explain my situation and see if there’s a solution. I have a server that runs a java web application that I want to run only on localhost. Yet, on this server, I have a PHP…
-
0
votes1
answer700
viewsLaravel 5.6 recover data from a form?
Error Symfony Component Httpkernel Exception Methodnotallowedhttpexception No message Method in the Controller class GuzzleController extends Controller { public function post(Request $request){…
-
0
votes1
answer363
viewsHow to show validation message below a group of radio buttons?
For the problem below consider that I am using Laravel (5.6* with default style files and javascript (no changes). My problem is basically when trying to display the validation message from the…
-
0
votes1
answer139
viewsError while working with date formatting in Laravel
I’m having a little trouble manipulating a input of the kind date. When using this type of input the date is formatted as Y-m-d, but in my form I want to type dd/mm/yyyy. Model User: //... protected…
-
0
votes2
answers992
viewsmkdir(): No such file or directory - Laravel
I have a problem in Laravel, when creating a folder in the Windows, with this method it creates the folder in the Linux, displays the error: ErrorException in Filesystem.php line 435:mkdir(): No…
-
0
votes1
answer479
viewsGroup By Days Laravel Eloquent
I’m having trouble grouping data together for different days. I have some reports registered and with the standard Created_at and Updated_at I’d like to show these communiqués Separated day by day..…
-
0
votes0
answers96
viewsLaravel 5.2: DB:raw in relationship
I need to access the table avaliações and make a calculation to calculate the grade of each product. I tried that way, but the field nota raised in the DB:raw does not appear when I try to access…
-
0
votes2
answers281
viewsRetouch several items of a relation - Laravel
I’m having a little problem, I have a relationship of course and student in the system. I created a show function in the controller and wanted to make sure that when clicking on the details it…
-
0
votes1
answer559
viewsPDF in Laravel returning selected View
Hello, I am using Dompdf to try to return a pdf report, but every time I call the view it is loading as if it were in an infinite loop and nothing happens. Follows my code Cursocontroller.php public…
-
0
votes1
answer95
viewsAuthorize AJAX in Laravel’s Register.blade.php form
I am using Laravel methods to register users, but I would like to use Javascript and Ajax events in the form to add specific information according to the information selected in the city combobox. I…
-
0
votes1
answer431
viewsHow can I create a custom method in the Laravel model and match the result of another?
I am working with Laravel and created the following method to research a model: public function search($string) { return (strlen($string) > 0) ? $this->where('name', 'like', '%' . $string .…
-
0
votes1
answer718
viewsController or Resource controller, how do I determine which one to use?
I am creating a small application using the Laravel 5.6, however, I’m having difficulty determining the route nomenclature, or rather, to determine whether or not I use resource Controller. I…
laravelasked 6 years, 7 months ago Fábio Jânio 3,407 -
0
votes0
answers266
viewsLaravel Blade prints html
For some reason when I use {{ }} to interpolate, Blade does not interpret the accents and print the html code on the screen instead of interpreting the code when I use {!! !! }, it prints correctly…
-
0
votes1
answer368
viewsSelect2 with ajax not returning data
I am trying to make an ajax query to an api to dynamically create a Select2. The api is returning data normally, but only the "No Results found" message appears in select. HTML <select…
-
0
votes1
answer421
viewsCoupon-style PDF size
I need to create a coupon style PDF, to send to a Daruma DR800 non-fiscal printer. I need to know how to generate a custom sized PDF and its contents. I already generate PDF with DOMPDF in Laravel…
-
0
votes0
answers770
viewsSQLSTATE error[42S22]: Column not found: 1054 Unknown column '' Laravel project, table with two foreign keys
Controller function for project voting has two foreign keys, user_id and projeto_idProjeto, follows function: public function votar($id){ $usuario = Auth::user()->id; $votoss =…
-
0
votes1
answer142
viewsHide and show according to button ID
Guys, I have a Jquery, JS problem I have a set of buttons with the initials of each name, I would like to make them appear with your Ivs when clicking and when click on another disappear the…
-
0
votes1
answer200
viewsRecover captured id with JS in modal
I have a button calling a modal for exclusion confirmation, this is in a table, each row a button to delete the registration of that line But the way it is he always deletes the first item from the…
-
0
votes1
answer68
viewsError when trying to enter form in the authenticated user’s Language (foreign key to another table)
I am trying to enter the data of a form of a class Condominium with the user already logged in and authenticated , user_id is foreign key to the table Condominium, in my understanding the store…
-
0
votes1
answer44
viewsAger loading and custom queries
This question is a follow up of this and of this. But I’ll try to make them independent. I have the following tables, weathers: +--------+-------+---------+ | id | temp | id_freg |…
-
0
votes1
answer577
viewsReturn form with data after Validator failure
I have a user registration form on Laravel <form class="form-horizontal" method="post" action="{{url('/usuarios')}}"> @csrf @if(session()->has('message')) <div class="callout…
-
0
votes1
answer100
viewsHow to use Anxious Loading nested in Laravel 5.4 correctly? My related tables return "null"
I have the following search in my application: $results = Profile::with('profileCategories.categories', 'informations')->where('ativo', '=', "1")->where('nome', 'like', '%' .…
-
0
votes1
answer40
viewsError sending information to the bank. Editing form
I have an edit form for a post feed. When I click to save the edit the following error appears: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "title" violates not-null…
-
0
votes1
answer89
viewsHow can I loop to insert data into a table in my form and then send it to my database?
//Part of the form to which I want to apply the loop <div class="form-row"> <div class="form-group col-md-6"> <label>Curso</label> <input name="cursolivre" id="cursolivre"…
-
0
votes1
answer79
viewsSort date on grid chronologically?
$.fn.dataTable.ext.search.push( function( settings, data, dataIndex ) { var min = $('#min-date').val() ? $('#min-date').val().split('/') : null; var max = $('#max-date').val() ?…
-
0
votes1
answer264
viewsRegistration of users with Adm logged in
I am developing a system with Laravel and I have the following objective: To make only the admin user can register new users. My problem is not to block the access of ordinary users to the user…
-
0
votes1
answer451
viewsRoute restrictions with Laravel
Good afternoon. How can I restrict some specific routes with Laravel? For example. If I have an e-commerce I will have users administrators who can access the administrative panel routes and all…
-
0
votes1
answer551
viewscsrf token error in the Laravel
I’m getting the bug Tokenmismatchexception in Verifycsrftoken.php (line 68) when I submit the following view information. Detail is that in all my views I have csrf_token because of the Blade…
-
0
votes0
answers34
viewsHow to add Laravel HTTP-Tests to a PHP package?
I am creating a PHP package, with Composer for when it is finished being published in Packagist. This package consists of many requests in other Apis, in case I am using the Guzzle. To perform the…
-
0
votes0
answers35
viewsHow to make multiple validations Requests in Laravel?
Laravel allows you to create Requests to validate fields coming from the front end, but I wanted to make several Requests to validate a giant Request. Is it possible? It’s good practice? I made…
-
0
votes1
answer45
viewsIs the writing of that function correct?
I made this function so that it would take a js request and when inserting the name of a category, give a select in the database, check if the name already exists and if it returns 0 in Count, it…
-
0
votes1
answer270
viewsDynamic Input, Laravel, JS
Hello, I’m trying to make a dynamic input, consists of a button that you add two fields at once, a text and a file, but I need to persist this in the database, I think I need to make the input Names…
-
0
votes1
answer666
viewsConsume API with Jquery and save to database
Good night! I am trying to consume an API using Jquery and Laravel. I created the route to access and save the data, access always returns me with status 0. web php.:…