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
-
1
votes0
answers445
viewsReflectionexception Class App Http Controllers API Usercontroller does not exist
When I try to hit the api/Register route, I get: Reflectionexception Class App Http Controllers API Usercontroller does not exist My Usercontroller <?php namespace App\Http\Controllers\API; use…
-
1
votes1
answer180
viewsRelationship of tables (Laravel API)
I am creating a PHP API using Laravel, but I could not make the relationship between two tables. User Table(Loginusers)>User Behavior(Behaviors) . I have already created the GET of Loginuser and…
-
1
votes1
answer167
viewsHow to write Query using Laravel
How to write this Query in Laravel? SELECT a.id, a.name, a.email, a.role, a.percentage, a.remaining_tax, a.min_peoples_per_table ,a.regions, GROUP_CONCAT( r.name SEPARATOR ", ") as regions_name FROM…
laravelasked 6 years, 1 month ago Daywison Ferreira Leal 101 -
1
votes1
answer119
viewsImage upload with Imagemagick
Using the library Imagick, it is possible to load an image directly from the upload? That is, without first having to move it to a folder and specify the path in the Imagick. I’m trying this way,…
-
1
votes2
answers329
viewsLaravel architecture for Saas systems
I am making a system in Laravel, but this system will serve several users, and these users can register their customers. The big question is, so that it doesn’t stay all in a single database, I…
-
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, 1 month ago Ronaldo Adriano 61 -
1
votes1
answer199
viewsLaravel Relationship on Datatable server side
Would you have some way to pass the model relationship to the columns of the Datatable server side? For example in the Datatable script: columns: [ { data: 'marca_id', name: 'marca_id' }, { data:…
-
1
votes0
answers43
viewsLaravel + Passport + Vue - Not finding
Gentlemen, I’m starting to develop an application using Laravel’s Passport method, but it’s not finding the VUE library. follows an image with the return of the browser: js file that imports the VUE…
-
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
answer2182
viewsCall to Undefined method Illuminate Database Query Builder::table()
I’m trying to popular a datatable, but I’m not getting any help. Could you help me? ============= Avaliativo_relatorio - Model ======== <?php namespace App; use…
-
1
votes1
answer250
viewsUse of Foreign Keys Laravel 5.6
Good afternoon to you all. I created a Migration "clients" in the Newsletter that receives 3 foreign keys from the entities: modalities, requests and locals. In my view when registering a client and…
-
1
votes1
answer133
viewsClause Where takes too long
I’m wearing the Laravel 5.6 My model is normal <?php namespace App; use Illuminate\Database\Eloquent\Model; class MyTable extends Model { protected $table = 'myTable'; public $timestamps = false;…
-
1
votes1
answer140
viewsUPDATE AJAX + LARAVEL
I need to update my table VIEW when the user watches 90% of the video of Vímeo, but I cannot use this logic with the Laravel. I have this following code in PHP normal: <div class="meu_iframe">…
-
1
votes2
answers272
viewsDynamically popular JSON with PHP/Laravel
I am working with Laravel in a project of a client where I intend to assemble a tree structure with registered users on the system, I found a script that performs this, and for this he uses Jsons to…
-
1
votes1
answer441
viewsError http 419 Laravel-Cors?
To fix Cors failure in the Laravel api I used the package Laravel Cors and followed everything that was reported in readme, but now it is returning an error to me when making a request http post…
-
1
votes2
answers257
viewsPassing the token of an Angularjs controller to an Laravel API
I am trying to pass the token that I have my controller to authenticate into an API in Laravel. However I am encountering the error: "token_not_provided" Note: I am using the Jwtauth with Laravel…
-
1
votes1
answer21
views -
1
votes1
answer2671
views -
1
votes2
answers39
viewsPopular column with created id + date/time
I have a column with the name "code". Is it possible to complete it using the same method as the form? If yes, how can I implement this in my code. Method that receives the form and inserts it into…
-
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
answer6293
viewsUpdate a single information in Laravel
I’m starting work with Laravel and I was wondering if you could help me. I need to update a single value in the bank, using 'name' in the Where clause instead of id. This is for a real system…
-
1
votes0
answers85
viewsLaravel (Blade) @lang in Vue components
Recently I started using Vuejs with Laravel and one of the first problems I faced was how to use the translations of Laravel (from the folder resource/lang ) in the Vue Components because in Blade…
-
1
votes2
answers94
viewsHow does the reader know which table of my comic will be used for my operation?
I have a table in my comic called lostanimals_, created without using Migrations. I created a class in the basement for her: namespace App; use Illuminate\Database\Eloquent\Model; class…
-
1
votes1
answer1411
viewsHigh 5.6 - global and dynamic variable
I have an API with Laravel 5.6 and need to create global variables that throughout the application can have their value changed, but I’m having problems. Example: 1. In the first request, the value…
-
1
votes0
answers637
viewsMenu Adminlte according to the user
I’m creating a scheduling system with Laravel and Adminlte. The authentication method I used was not the Laravel Auth or the Adminlte, because I simply used a Controller that uses a method for…
-
1
votes1
answer62
viewstrue giving problem(bug) in code
Good evening guys, I was developing a script in php and when I put true being passed by parameter to a function inside an array dynamically , he gave a bug. I can not explain the bug right, but the…
-
1
votes1
answer1595
viewsHow to use error-free forelse in the form - LARAVEL?
Good afternoon, I have a form that it brings a database array by user_id, only it has a problem after I put the forelse it is not bringing all the data, because if it has more than one data it…
-
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
votes1
answer794
viewsCustomization of Fields Login Laravel
It’s been a while since I’ve been banging my head with this Laravel Authentication System and I need to learn how to correctly overwrite the functions to be able to use custom fields by default…
laravelasked 5 years, 11 months ago Vinícius Pereira Gonçalves 29 -
1
votes0
answers70
viewsInteger conversion in Laravel Controller
I have the following data in the controller: $sheets = printerChange::select('folhas'); $sheetsNew = printerChange::select('folhasnew'); $sheetsCompare = (int)$sheetsNew; if(!is_null($sheetsCompare…
-
1
votes0
answers248
viewsHow to create a multi-level menu with Adminlte Menu Runtime in Laravel?
I joined the jeroennoten/Laravel-Adminlte to a project Laravel 5.7, however, I’m having difficulty generating a menu with multiple levels. According to the reference in the project repository…
-
1
votes1
answer83
viewsSomething wrong with if in Laravel controller
I have a function in a controller of the Laravel, at first it seems to be working well but, when it goes through the part of "if" jumps straight to the "Else", here is the code that is in the…
-
1
votes0
answers30
viewsChanging the x-axis data type of a graph? PHP/Laravel 5.6
Good night, I’m using a fast development tool called Quickadmin, accurate render a graph on the screen to the user who has on the x axis a string type data and on the y axis a time type data. The…
-
1
votes0
answers54
views -
1
votes1
answer115
viewsI can’t make research work with eloquent and relationship!!! Laravel 5.5 and mysql
I’m doing a search taking a piece of word and playing a search like LIKE for fields fields. Use the Eloquent and relationships, but does not bring the data. { $pesquisa = $dataForm['pesquisa'];…
-
1
votes2
answers262
viewsReturn array of properties in the Laravel
I created a function in the controller that returns the users where the user condition is 1. Currently it is returning in json all the data of this user. How can I return only user emails? I tried…
-
1
votes1
answer219
viewsFill modal with Vue js
The problem: I’m developing a site that has a feed with publications, each post has comments. When I click on the post comments button, I need to load a modal filled with comments and post. That…
-
1
votes3
answers53
viewsCode Duplication in Laravel ORM
I was working and came across the following situation: if (($entrada == null) and ($parcela == null)) { $cotas = Produto::orderBy('credito', 'DESC') ->where('id_subcategoria', $subcategoria)…
-
1
votes1
answer194
viewsDelete function kills session in Laravel 5.5
When deleting a selected user, other than the currently logged in user, the function modeloReferenciadoPorObjeto->delete() of Laravel is terminating the logged-in user session. public function…
-
1
votes2
answers1154
viewsGenerate line break in Vuejs with v-if
I have a method that does a search in an api made in Arabic and returns me a json, I need to go through this json in a v-for and every 3 interactions a new Row is created. In PHP it would look…
-
1
votes0
answers1325
viewsError loading facebook PHP SDK URL when logging in
My login function is thus on Laravel public function loginFacebook(){ $fb = new Facebook([ 'app_id' => 'xxxxxxxxxxxxxxx', 'app_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxx', 'default_graph_version'…
php laravel facebook facebook-graph-api facebook-sdkasked 5 years, 9 months ago Tiago Ferezin 1,567 -
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
votes0
answers62
viewsHow to classify the multidimensional array by value?
How can I classify this array for the value of the key level, even though the values are currently sequential, they will not always be? array:67 [▼ 0 => array:3 [▼ 0 => array:8 [▼ "idPai"…
-
1
votes0
answers79
viewsLaravel + Vue Lang.js Localization
I’m having trouble translating my page using the Lang.js in the Laravel. I need to get the chosen language in the user settings using the Axios, and translate using a filter Vue. The function…
-
1
votes1
answer236
viewsCount returning null value with Query Builder Laravel
I have a problem, I have a query that searches the employee data plus the sum of vacation days and absences that an employee has. The query is working if the employee has some day registered in the…
-
1
votes1
answer224
viewsDoubt Laravel Queue, Job, Mail
I’m trying to get my system from a cronjob, send email to a certain list, my problem is this: when I do it through a route have no problem any emails are sent! But when sending the email is done…
-
1
votes1
answer208
viewsAccessing attributes from multiple different relationships in a CRUD Eloquent Laravel 5.7
Guys I have a structure like this model (Modelo apenas ilustrativo) and want to know how I can access the data of the whole relationship to make a insert/update in these tables with the data…
-
1
votes1
answer180
viewsMake a bank GET from an Laravel Array
I have a select where I do a search from an informed id, No Postman do a POST by sending an array to as in the example below [ { "id":"1" }, { "id":"2" } ] In the repository I search for these id to…
-
1
votes2
answers585
viewsDisplay results of Join in view with Laravel
I’m learning laravel and I have a relatively simple question regarding a consultation using join in Laravel. How do I access the field value categoria.name in my view. Follow the consultation and…
-
1
votes1
answer292
viewsLaravel informs that the page was not found: 404 on the master/test route
How to make this update work? Below page code. Form_edit.php <form role="form"> <div class="box-body"> <div class="form-group"> <label>Name</label> <input…