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 votes1 answer87 viewsLaravel Mysql - display the amount of records in a Join queryI have the following query: $empresas = DB::table('empresas') ->join('departamentos', 'empresas.id', '=', 'departamentos.empresas_id') ->join('eventos', 'eventos.departamentos_empresas_id',… 
- 
		-1 votes1 answer229 views
- 
		-1 votes1 answer215 viewsProblem with routes in the Axios + AravelI’m using vue.js with axios to make Cruds but I have a question about routes. I have the following routes: | DELETE | admin/deleteprod/{id} | componet_3.produtos |… 
- 
		-1 votes1 answer137 viewsPHP - Sort object by date without keyI am receiving from an API the following object: { "30/01/2019": [ { "type": "document", "filepath": "url", "recipients": [ "Todos" ], "category": "Ata", "date": "30/01/2019" }, { "type": "note",… 
- 
		-1 votes1 answer275 viewsLaravel Dynamic Fields - FormsHow best to create dynamic fields in the view ? Suppose I need to create several products in the register and mention the type of product or category. I’m using it this way: <form action=""… 
- 
		-1 votes1 answer702 viewsHow to resolve "Array to string Conversion" Laravel ErrorI am trying to update a registration form modal. The following error is occurring: Array to string Conversion (SQL: update checklist_protocolo set item = 0, item_descricao_id = 5, sim_nao = on,… 
- 
		-1 votes1 answer540 views
- 
		-1 votes1 answer120 viewsError of CORS Ionic 3I’m trying to connect my application with a backend server in Laravel I have an Interceptor that adds headers to the request: intercept(req: HttpRequest<any>, next: HttpHandler):… 
- 
		-1 votes1 answer20 viewserror while passing variables in a controllerGood morning programmers , I have a problem passing two variables from one function to another, I think. Below follows the Code class pdfController extends Controller { public function index($id) {… 
- 
		-1 votes1 answer266 viewscall authenticated Laravel apiGood morning, all right? I am reading an api (which can only be accessed with user authentication) done in the Standard. To consume this data, I am using jquery/ajax. I know I need to send a token… 
- 
		-1 votes1 answer84 viewsSelect does not show the selected rowI have a zip code field where I make a query via javascript, so far so good, is working, in my form I have log field, number, neighborhood (city and state that are selected) I wanted to select the… 
- 
		-1 votes1 answer772 viewsLaravel - Hasone 5.8I have no problems with registering related data in Hasone I have doubt about registering 2 hasOne data... I know that to register two hasOne data is as follows example: $users = User::create([… 
- 
		-1 votes1 answer59 viewsController in Laravel is not receiving values sent by AjaxI’m doing a Wizard where I add one product at a time by clicking on a button and Jquery adds the values in an array, and when I click on the next button I make an ajax request sending the values of… 
- 
		-1 votes1 answer114 viewsLaravel 5.8 - Relationship listingI have the following code in my controller funcionarios::with('user', 'rh')->get()returns all beautiful related data but only the first record is really related sure the others in the RH… 
- 
		-1 votes1 answer474 viewsProblem with Cors Laravel project 5.5 and VuejsIn an Laravel project using the features of an API I have some logos and I have my endpoints in the Laravel.php api file <?php Route::post("auth", "Auth\AuthController@authenticate");… 
- 
		-1 votes1 answer161 viewsLaravel File Reading and WritingI’m trying to read a file that comes from a form. When I send it to the Controller, I have to read the file and look for a line, if it exists, add a line right below. Doubts: 1- I can find the… 
- 
		-1 votes2 answers3544 viewsSQLSTATE[HY000]: General error: 1364 Field 'gender' doesn’t have a default valueI am trying to start a project in Aravel and am getting this error while selecting sex when registering "SQLSTATE[HY000]: General error: 1364 Field 'gender' doesn’t have a default value" return… 
- 
		-1 votes1 answer358 viewsError accessing localhost after installing LaravelAs I said in a previous question I am starting my studies and have already done the search for this error now in several places. Recently I installed Composer and Laravel on my note and when I run… 
- 
		-1 votes1 answer585 viewsI cannot log into phpmyadmin on the project using Laradock (Laravel and Docker)I’m a beginner and started a PHP project using the Laradock environment. Well, I have everything installed and configured, the containers all running and I can access the project under development… 
- 
		-1 votes2 answers54 viewsfor/if PHP omitting elementI have a big problem. I have a PHP/LARAVEL system that issues PDF reports. The system it is omitting an element when placing it in an array. I believe it’s time to assemble the loop and make the… 
- 
		-1 votes1 answer224 viewsValidation of data on the LaravelHey, hey, it’s okay!? I have implemented a business rule in which I need to validate data, I have created an external repository to http folder and I am using the library prettus/Laravel-validation… 
- 
		-1 votes2 answers242 viewsHow to separate a web system with API in domains?Assuming I have to develop 1 app and 2 dashboards, the mobile app is powered by an api developed in php (which is managed by one of these dashboards), and the other dashboard connects to the app.… 
- 
		-1 votes1 answer400 viewsLaravel: Take the value of an array without foreachI have the following appointment: $TenantId = DB::select('select tenant_id from users where id = :id', ['id' => '7']); dd($TenantId); The result of $Tenantid is: array:1 [▼ 0 => {#357 ▼… 
- 
		-1 votes1 answer97 viewsBlade view SupportThere is some way to add a Count in the Blade. For in the interaction it returns 1 1 0 0 @forelse($surveys as $survey) <p> @forelse($survey->options as $option) {{… 
- 
		-1 votes1 answer636 viewsHow to use the SUM in the Laravel?MODEL CUSTOMERS public function titulo() { return $this->hasMany('App\Models\Titulo'); } MODEL TITLE public function cliente() { return $this->belongsTo('App\Models\Cliente'); } MIGRATION… 
- 
		-1 votes2 answers562 viewsUse update method without using Edit, LaravelI have a view q shows a user’s access key, in it I need to press a button q will update the access key randomly, the update returns to the view but does not modify the key. How can I fix this?… 
- 
		-1 votes2 answers71 viewsI have the following query using PDO, but how do I switch to Eloquent Laravel?This serves for me to report through a timestamp in the column dating if my data has any modification. foreach ($lista_cnae as $cnpj => $lista) { $lista = "'" . implode("','", $lista) . "'";… 
- 
		-1 votes2 answers81 viewsIs it correct to mix JSON format with Mysql?I am helping to develop a web application in Laravel for a company. It has several Modals included in them (including modal that leads to another modal). To call these modals, I am using Jquery, as… 
- 
		-1 votes1 answer342 views
- 
		-1 votes3 answers973 viewsLaravel - validation of the field formatted with BR currencyI’m using the jQuery Input Mask to put mask in values. As much as in the front end the mask avoids being informed of any character other than numbers, dots or the comma, it is necessary to validate… 
- 
		-1 votes2 answers296 viewsBring data and save to a variable in Controller - Laravel APIpublic function getListaPresencial(Request $request, Presencial $Presencial) { if ($Presencial->id) { return response()->json(['data' => $Presencial->toArray()]); } $query =… 
- 
		-1 votes1 answer236 viewsHow to add values in the middle of a foreach?I have a foreach which mounts several tables, but has a td in my table he is the sum of others td. I tried to do with Javascript and put together some PHP, but without success. The field is the last… 
- 
		-1 votes2 answers916 viewsHow to integrate the awesome font in Laravel?I’m using the awesome font in Windows along with bootstrap, until then used via Link, both css and js. Today I’m migrating to control via npm, but I install and the icon does not appear. They can… 
- 
		-1 votes1 answer81 viewsMy ajax request does not work when I put it on the web route, only in the apiRoutes: //Rotas para clientes Route::get('/cliente','ControllerCliente@indexview'); Route::resource('/clientes','ControllerCliente'); Controller: public function store(Request $request) { //Função… 
- 
		-1 votes1 answer104 viewsError trying to access Auth::user()->id, in Laravel 5.8Error: Auth::user()->id trying to get a property of a non-object Model: <?php namespace App\Models; use App\Scopes\Tenant\TenantScope; use App\User; use Illuminate\Database\Eloquent\Model; use… laravelasked 6 years ago André Cabral 811
- 
		-1 votes1 answer191 viewsPagination with filter - LaravelI’m having trouble paging using filters. Simple paging works normally, but when filter and advance to a next page, I lose filters. I had never used filters, if it is not running in the best way, I… 
- 
		-1 votes2 answers228 viewsTwo tables without relationship filter - LaravelI’m having trouble filtering with two different models. The problem is that there is no relationship between the tables. That’s right =/ The modeling was done by someone else, who said that it would… 
- 
		-1 votes1 answer348 viewsHow to download private files in Windows?The idea is to upload confidential documents, so I can’t put them in the folder /public. The goal is that in the views I can access these private files. Local: 'disks' => [ 'local' => [… 
- 
		-1 votes3 answers647 viewsStoring latitude and longitude LaravelI am storing in the database the latitude and longitude. When returning this latitude it is returned as string. I used decimal casting to return a number with all decimals but continues to return as… 
- 
		-1 votes1 answer121 viewsConnect Laravel to MysqlI’m trying to develop an Laravel application with Docker My Docker-Compose.yml file looks like this: version: "3.3" services: mysql: image: mysql:8.0.1 container_name: mysql environment:… 
- 
		-1 votes1 answer467 viewsHow to put a "read more" "read less" button on a php foreach?Hello, I have an array within a foreach that brings a list of procedures. But I want only the first three to appear and have a "read more" "read less" link to show the rest of the content or hide… 
- 
		-1 votes1 answer46 viewsLaravel - loading data into an array when performing loop querysI’m performing querys in a loop on a controller and need to go loading the information in a array to then send to a view and print. Turns out I don’t know how to input the data as follows… 
- 
		-1 votes1 answer169 viewsPhpmailer email sent successfully but not received Amazon SESI’m using Amazon’s Phpmailer Laravel SES. My account is not in a sandbox. My problem is when I try to email the Laravel admin panel on my website to my customers. I am informed that it has been… 
- 
		-1 votes1 answer296 viewsLinks of the Docker-Compose - Laravel + RedisI am creating a development environment for a Docker-based 5.0 Standard project. I managed a file docker-compose.yml for http://phpdocker.io and I made some modifications, he’s this way:… 
- 
		-1 votes1 answer38 viewsDoubt of structure using Global Scopes in LaravelA doubt of structure. Scenario: I have 3 users: administrator, stores, customers. I have a product model and I want to define a global Cope in it so that when stores access the product listing the… 
- 
		-1 votes1 answer137 viewsHow to save the data by removing the characters from Mask using Laravel 5.6?Hi, I’m using Laravel, and I want to save the data after done a calculation. I am using the Jquery Mask plugin to facilitate user understanding. However, I have no idea how to filter Mask data to… 
- 
		-1 votes1 answer148 viewsHow to recover values in a hasMany relationship in LatinPersonal I have the following function within a Model Campaign. public function success_payments(){ return $this->hasMany(Payment::class)->whereStatus('3'); } This function returns the Payment… 
- 
		-1 votes1 answer48 viewsError when starting "Homestead" in Vagrantbarbosa@Mysterio MINGW64 /c/ambiente_dev/maquinas_virtual/vagrant_boxes/Homestead (release) $ Vagrant up C:/Hashicorp/Vagrant/Embedded/mingw64/lib/ruby/2.4.0/Psych.Rb:377:in parse':… 
- 
		-1 votes1 answer130 viewsPicking up API dataGood Morning, I am taking data from an API and it returns me 100 records per page, however it does not tell me how many pages there are of record. The only information that is passed to me is when… 
- 
		-1 votes1 answer114 viewsHow to edit a record with union fields in the Standard?I am not able to edit the registry with single emails always says that the value already exists when I try to save the record. URL: http://dominio/dashboard/admin/franqueados/11/edit REQUEST: public… laravelasked 5 years, 10 months ago André Cabral 811