Most voted "laravel-5.2" questions
Laravel is an open-source framework for developing web applications and services with PHP. Prefer the Laravel-5 tag if you are not dealing with an exclusive Laravel 5.2 feature+
Learn more…31 questions
Sort by count of
-
5
votes3
answers245
viewsError doing Join with Laravel Query Builder
I’m doing the following Join: public function getStockDanger() { $data = DB::table('product') ->join('stock', 'product.id', '=', 'stock.product_id') ->where('stock.stock', '<=', 0)…
-
4
votes1
answer624
viewsLaravel 5.2 with pagination
I have the following function inside the controller public function home() { $igrejas = Igreja::paginate(3); $igrejas->setPath('igrejas'); return view('admin/igrejas/home')->with('igrejas',…
-
4
votes3
answers145
viewsBlade default value Laravel 5.2
I have the following code <strong class="primary-font">Complemento</strong> <p>{{ $produto->complemento or 'Esta produto não tem complemento' }}</p> I need that if the…
laravel laravel-eloquent laravel-blade laravel-5.2asked 7 years, 11 months ago Danilo Tiago Thai Santos 409 -
4
votes3
answers684
viewsUpdate registration with Laravel 5.2?
I have the following function : public function alterar($id) { $produto = Produto::find($id); $params = $request->all(); $produto->fill($params)->save(); return…
-
3
votes1
answer514
viewsUsing php Artisan make:Repository
Hi, I’d like to ask you a question. I’m using the remote: php artisan make:repository ProjectNote And I would like to know how do I make the command understand that I want my migrate to have the…
-
3
votes1
answer5730
viewsPlease provide a Valid cache path
I just made a git clone (copy) a newly made Laravel application in the company where I work. I surrounded the composer update and artisan key generate to make initial settings as well as edited the…
-
2
votes2
answers1150
viewsGroup items by month and count them
I need to group and count all items by mês. Utilise Laravel 5.2, tried to do so: $mes = date('m'); $vendas = Encomenda::where('FlgStEncomenda', 'O') ->group("MONTH(created_at)={$mes}")…
-
2
votes1
answer1254
viewsReceiving an ajax request with Laravel
I am having problems in recovering the data sent by my ajax to the laravel. Man ajax is like this: var id = $(this).siblings(':hidden').val(), qtd = $(this).val(), dataUser = { "id": id, "qtd":…
-
2
votes0
answers96
viewsDoubts relationship too much for many
I have the following relationship: My doubt comes in the programming of the ordering model: class EncomendaProdutos extends Model { use SoftDeletes; protected $fillable = [ 'CdEncomenda',…
-
2
votes1
answer2272
viewsObject of class Illuminate Database Eloquent Builder could not be converted to string. Standard 5.2
I’m having problems with a relative search on Laravel. I give option of several searches on the screen, are they: initial date final date status, and whose is but one can search in a unitary way,…
-
2
votes1
answer363
viewsProblem with wherein Eloquent Laravel
I need to execute a query with the parameters as below: $questoes = Questao::leftJoin('capitulos_questoes', 'capitulos_questoes.questoes_id', '=', 'questoes.id') ->leftJoin('modulos_questoes',…
-
2
votes0
answers111
viewsLaravel and JWT - Does not generate token (invalid credentials)
I’m having a problem using the following code: $credentials = $request->only('email', 'senha'); try { if(! $token = JWTAuth::attempt($credentials)){ return response()->json(['error' =>…
-
1
votes1
answer779
viewsHow to restrict access to user registration page?
Following people I am creating a project in Aravel 5.2 I used the auth classes of the Aravel itself. And I’d like to know how I can be setting up the same for that page /register is accessed only…
-
1
votes0
answers98
viewsLaravel 5.2 Redirect::back()->with and Redirect::back()->withErrors does not work
I have already developed several applications with Laravel. The problem arose when suddenly in version 5.2 the Redirect::back()->with and Redirect::back()->withErrors command stopped working.…
-
1
votes0
answers374
viewsLaravel Checkbox Recording/Editing 5.2
Hello, I’m developing a Course Registration in Laravel 5.2. I created CRUD perfectly, it creates, edits and deletes everything right, but in this register has 3 items that are of type CHECKBOX, I…
-
1
votes1
answer465
viewsLaravel 5.2 - Relationship Many To Many between records of the same table
The tables: The table users, records users who may have N functions that are stored in the table funcoes (student, responsible, teacher, etc). The table funcao_user is pivot that makes the…
database laravel laravel-eloquent relationship laravel-5.2asked 7 years, 9 months ago Julio Alves 83 -
1
votes2
answers1063
viewsGrab image inside Storage folder
I’m uploading images to the folder storage, app/public, inside this created a folder /banners and I’m uploading these images into this folder. How can I take these images and display in the view?…
-
1
votes1
answer47
viewsUse find field returned to add more results in the same query
In the code below I look for a product and take the field "related" it to make a search in the bank bringing all the products (including himself) that have the same value in this field. It is…
-
1
votes1
answer873
viewsEloquent: relationships between blog tables
Someone would have a practical example of using relationships in Eloquent as follows: I have a blog with several categories, in these categories I will have several Posts, as I do to display a…
-
1
votes1
answer503
viewsCall Oracle function in Laravel?
I did all the configuration to connect on Oracle, it connects, but I want to make a query within a function, but it is giving the following error message: Queryexception in Connection.php line 729:…
-
1
votes1
answer150
viewsInsert data into Oracle table "no returning id into"?
I’m using Laravel 5.2 and when I have enter data he wants to return the last, but at the moment I want to enter and know if the operation was successful. My role in the controller is like this:…
-
1
votes1
answer65
viewsform does not access the route created in the Laravel
I have a ready form that I am trying to incorporate into a 5.2 Standard System <form name="formEireli" id="formEireli" action="{{ url('script') }}" target="_blank" method="post"> is in the…
-
0
votes1
answer67
viewsDoubt with Laravel MVC
I made the presentation to the teacher of Pfc but she said I broke the mvc pattern, calling the sql in the controller, and asked to send it to the model and retrieve the query for the controller and…
-
0
votes1
answer551
viewsHow to recover image from Storage folder using INTERVENTION IMAGE Laravel 5.2?
This solution works in Public more folder when switching to Storage folder I can’t grab the image and display in the view someone can help me? Controller public function profile(){ return…
-
0
votes1
answer245
viewsHow to delete an image from Storage Folder 5.2?
I’m using this code to upload image this all working my doubt and in the if condition to delete the old image I have to leave a default image.jpg as default plus my condition if this deleting that…
-
0
votes1
answer140
viewsLaravel 5.2 non-object problem in foreach
I’m trying to pull the information from this relationship as you can see below: Model: public function endereco(){ return $this->belongsTo('App\Models\End\Logradouro_Bairro'); } public function…
-
0
votes1
answer497
viewsCall to Undefined method Illuminate Database Query Joinclause::whereBetween() Laravel 5.2
I have this error in my consultation, I have identified that the use of whereBetween within a function join is impossible to use, but I saw that the staff was able to use the DB::Raw and replace…
-
0
votes0
answers58
viewsProblems with Laravel 5.2 routes and AWS EC2 server
I’m having trouble getting my project up to hosting, when access to the service via localhost everything works perfectly, but when I upload my project to the server it presents the error: My…
-
0
votes1
answer89
viewsLaravel 5.2: Multi authentication always returns false
Is always returning error when making the login, even if the data is correct. I’ve seen several topics about this error, but none solved the problem. CONTROLLER public function cadastro(Request…
-
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…
-
-1
votes1
answer446
viewsHow to update data from an Laravel 5.2 registration?
I’m touching the Laravel a short time, I have name, email and password and wanted to know how to update this data with a form. <div class="container"> <div class="row"> <div…