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
- 
		2 votes1 answer323 viewsError auth Lockable with another model?People changed the name of the standard model of Laravel User.php for Colaboradores.php (of course, I set the $table and the $primaryKey model), I also changed the config/auth.php to model. but… 
- 
		2 votes0 answers120 viewsLogical Doubt Generation of Laravel RoundsI have a championship management system in Laravel. The system works perfectly, but I’m having problems generating rounds, I need that regardless of the number of groups enrolled, the system can… 
- 
		2 votes1 answer940 viewsProblem with search and paging in Laravel?The code below returns all bank records and also searches for the term entered in input search with pagination. The problem is that by clicking for example on page 2 it already refreshes the page by… 
- 
		2 votes2 answers239 viewsCreation of tables with cardinality 1 : NI have two tables, PRODUTOS and INSUMOS. To create a product I need several inputs, I would like to know how I should proceed with this relationship in Mysql. I must create a table called COMPOSICAO… 
- 
		2 votes1 answer1112 viewsPopular Select with Laravel 5.6 database recordsGood afternoon. I am having difficulties in popular a select with records from my database. I have a staff table that relates to other 3 tables (Office, Sector and Department). Currently I can only… 
- 
		2 votes1 answer475 viewsAdvanced search in Laravel 5I’m starting to Laravel 5 and as an apprenticeship I am creating a simple employee registration. What I need is to recover from the bank a relationship of employees with exams based on search… 
- 
		2 votes3 answers560 viewsBootstrap tab panel - How to go to a specific tab?I have, in PHP, a method whose code returns values, passing them to a View, as block below: return view('PesquisaView') ->with('clientes',$resultadoClientes) ->with('advs',$resultadoAdvs)… 
- 
		2 votes1 answer36 viewsSimple question about Laravel and get() functionHello, I’ve been using Standard for some time now and I’m familiar with the framework, but I would like to know the real need to use the get() method when calling a class. For example: Using get():… laravelasked 7 years, 1 month ago André Tripode Colognesi 157
- 
		2 votes1 answer1474 viewsLaravel NotfoundhttpexceptionI had a project in my machine where I created the Laravel via $ New application Laravel I copied this project to another machine with the perfect shampooing equal to the desiccation machine, but… 
- 
		2 votes1 answer207 viewsProblems with JWT tokenI am using a system that, using JWT tokens pass for authentication, the problem is that I can easily collect the headers of the API calls and grab my token to be able to order whatever you want and… 
- 
		2 votes1 answer96 viewsLaravel - default routeHello I’m new in Laravel and I was wondering if you can leave a default route in case someone misses the route typed in the Return page laravelasked 7 years ago Cyber Hacker 469
- 
		2 votes1 answer71 viewsHow to put the zerofill Constraint in Laravel 5.6?Good afternoon. I’m having a problem making use of the zerofill Constraint in Laravel because I saw that it is not in the documentation. I have a field in my table that is enrollment and in my view… 
- 
		2 votes1 answer147 viewsError switching hosting server - Laravel PHPWhen switching hosting server, the application shows the following error. session_start(): open(/var/lib/php-cgi/Session/sess_bd836c00fd2e50a6ad60859449d28a85, O_RDWR) failed: No such file or… 
- 
		2 votes1 answer671 viewsConsultations with LaravelI started recently with Laravel and I have a terrible doubt. I have done several searches on google that have only left me even more confused. I have a table of news and a table of photos. Each news… 
- 
		2 votes1 answer11610 viewsWherein no EloquentI’m trying to implement a query with the use of whereIn in Eloquent, but always generates a mistake, someone would know to give me guidance on? My code is like this: $result =… 
- 
		2 votes1 answer345 viewsHow to return relegated records between Laravel tablesI have 2 tables city and state I own the state and would like to know how to return all the cities related to the state Parana simply without having to do a loop Type $estados = App/Estado::all();… 
- 
		2 votes1 answer54 viewsInfinite relationship...?I have a question that would be, how to accomplish a relationship that can be infinite.: Ex: User table with the user id field that would be one for many with Post Table. Inside the Post Table would… 
- 
		2 votes2 answers1954 viewsRelationship with 3 tables in StandardI’m trying to make the relationship between three tables in the Latvian. With 2 tables I managed, thanks to the help of the forum, but I’m not able to make it work with 3 tables. the relationship is… 
- 
		2 votes1 answer2431 viewsSelect with Laravel/EloquentI have the following select in my controller: $turmaAlunos = DB::select(' SELECT alunos.ST_ALUNO_ALU, alunos.ID_ALUNO_ALU FROM alunos WHERE alunos.ID_ALUNO_ALU NOT IN ( SELECT… 
- 
		2 votes1 answer128 viewsType of relationship between tables (Laravel)I’m implementing my TCC, about photos and such.. But now I got a question when creating the tables... I’m using Laravel ok? Next, I have the following tables: users - roles - photos - tags works as… 
- 
		2 votes1 answer165 viewsLaravel - Relationship Manytomany Extra ColumnsI have the following scenario in a database: Tables: User id, name email Enterprise id name User company id_usuario id_empresa start date end date In this scenario, I need to bring the information… 
- 
		2 votes1 answer49 viewsForm value does not return in the CollectiveThe form in the edção part, does not show the value coming from the database. All other form fields are returning the value taken in the database. See how I’m doing: <div class="col-md-3"> {!!… 
- 
		2 votes0 answers104 viewsHow to add Reliese/Laravel in the latest version of the Lumen/Laravel app?I just installed the Lumen and I’m gonna need to use the Reliese to create Models (and Migrations) from an existing database. Following the documentation, after the installation I need to add… 
- 
		2 votes1 answer26 viewsLarval Relationsships 5.4 accessing search data with?I have a relationship of One To Many, wanted to know how to access data from the two tables. Behold: Album::with('imagemAlbums')->where('departamento_id', $id)->get(); Return of dd() now in my… 
- 
		2 votes1 answer3056 viewsSave inputs with PHP/Laravel arraysI have a dynamically generated table where I insert several products. I’m trying to use a for to save these products, but if I only have one product doesn’t work anymore, you need to have more than… 
- 
		2 votes1 answer1190 viewsLog variable in LaravelI am registering a name in a modal, sending it to the controller and putting it in the session. When returning to the view there is nothing in the session. What am I doing wrong? Controller… 
- 
		2 votes1 answer216 viewsController exists but Lumen says it does not existMy routes are like this. http://localhost:8080/api/v1/Communities <- this is the url I’m requesting $app->group(['prefix' => 'api/v1'], function($app) { $app->get('/',… 
- 
		2 votes2 answers980 viewsRemove an item from an array in Laravel’s SessionI have an array in a Session and I need to remove only one item. Put session()->forget('cart') it removes all items. What is the correct way to remove only one? Controller namespace… 
- 
		2 votes2 answers1849 viewsCreate Controller in a specific folder in Laravel?I’m with a little doubt that came to me, I’m learning Laravel, and so far to create a controller I used the command php artisan make:controller, he leaves the controller in the briefcase Controller… 
- 
		2 votes1 answer401 viewsMkdir(): Permission denied on WindowsI try to configure Vuejs in the Laravel with the following code: php artisan preset vue However, I resume this mistake: ErrorException : mkdir(): Permission denied I am using Windows and my project… 
- 
		2 votes1 answer59 viewsHelp with a simple JoinGood evening, I don’t know what I’m doing wrong, I have two models, in Migration I created like this Schema::create('endereco_tipos', function (Blueprint $table) { $table->increments('id');… 
- 
		2 votes1 answer63 viewsHow to recover old values from select inputs?Follow the code of the Lade: <select name="tipo_id" class="form-control col-md-3 col-xs-12"> <option value=""></option> @foreach ($tipos as $tipo ) <option name="tipo_id"… 
- 
		2 votes2 answers1212 viewsHow to pass parameters to the Resource controller directly from the View with Helper url()I have the following route on my Laravel app (v5.5): Route::resource('tags', 'Painel\TagsController'); In accordance with documentation official, this gives me a route with action Edit, verb GET and… 
- 
		2 votes1 answer750 viewsInvalid Handle returned - Laravel connection to SQL ServerI was developing an application with Laravel 5.5 with a Mysql database. Everything was working normally, however, now the database has been modified to SQL Server. When I perform the test, returns… 
- 
		2 votes2 answers1485 viewsI don’t understand why Empty says the variable is not emptyThere is a module of Members, where members of a church are registered. By this registration will be shown on the main page the day’s birthday on a jQuery slide. But when he doesn’t have a birthday… 
- 
		2 votes1 answer1512 viewsHow to load edit modal dynamically using Laravel?In an application I am doing the following to load my Bootstrap Modals index.blade.php Obs: data-target(#Edit{$ecategory->id}}) used to call modals @foreach($ecategories as $ecategory) //listando… 
- 
		2 votes3 answers824 viewsExcel rounding value 7,256E+18That old Excel cell formatting question is causing me problems now. I use the Laravel framework and to export the data I use the Laravel Excel. I’m formatting the cell to type text and yet Excel… 
- 
		2 votes1 answer164 viewsERROR creating Unique constraint with two fields in the Laravel request?I tried to implement an example I found here at Stackoverflow however unsuccessfully. RULE: Unique double (user_created - description) / User Code you created and Description Another user could… 
- 
		2 votes2 answers981 viewsHow to access relationship attributes in Laravel?In the image below we see a typical example of Collection in Laravel. We may see in Relations there is another Collection. How do I access this in the View? I’m doing so in Controller: $users =… laravelasked 8 years ago Diego Souza 16,524
- 
		2 votes3 answers1024 viewsERROR: No application Encryption key has been specifiedGood morning, I’m trying to download a template on this link: https://itsolutionstuff.com/post/php-laravel-57-create-admin-panel-exampleexample.html But at the time of the command : php Artisan… 
- 
		2 votes1 answer1821 viewsHow to send an email after user registration has been done? Laravel 5.4I need that when a user is registered he takes the value of the email field and passes to the function $message->to($request->email) to send the email to the registered user. See how I am… 
- 
		2 votes1 answer75 viewsProblem in SQL query in the LaravelI’m not really understanding these queries in php Standard. I searched cities states where when searching the state lists the corresponding city, but it does not find the table id if the… 
- 
		2 votes2 answers272 viewsFilter information for the current dayI have the following variable in my View: Auth::user() ->LogsSearch() ->where('base', $linha->sigla) ->where('created_at', date('Y-m-d')) ->count() and I want to filter the results of… 
- 
		2 votes0 answers134 viewsTree 5.5 - categories of a treeI have the following structure of a table "Categories": public function up() { Schema::create('categories', function (Blueprint $table) { $table->increments('id');… 
- 
		2 votes1 answer1472 viewsLaravel Search Form 5.5I would like to know how to filter my data from the database with a form where it contains more than 1 field to filter, I could only do with one field. Form: <form action="{{ url('panel/brands')… 
- 
		2 votes1 answer2127 viewsWhy can’t the web server find my route?I did the upload of a system in Laravel called android_api on the hostgator server, and configured in the public file. Until the main page it works, where Laravel 5 appears, but when I put the route… 
- 
		2 votes2 answers52 viewsRandom key during user creationIn my migration of User owning: name, id, email and authorization key, however, I would like to know whether it is possible to authorization key is created randomly during user creation, this key… 
- 
		2 votes3 answers157 viewsHow to do explode inside the $request->all() arrayI need to go through this array and get all the keys that start with col. Does anyone know how to do this? array:8 [▼ "_token" => "NZ68b8h3L560aUc6DXBeb8Myb4JFD0hSgfSpJ2Lk" "_method" => "PUT"… 
- 
		2 votes1 answer1478 viewsClasura Where em campo tipo json no (Laravel + Eloquent)The problem is the following, I have to bring from a select the permissions that a profile has, only that the permissions are in a json field, and because it is several permissions we have a… 
- 
		2 votes2 answers226 viewsLaravel and Sqlite databaseThink of me, you have server Laravel with a Sqlite database configured, access to this database in thesis is to be faster, since it is on the server itself. Follow the example: user -> server…