Questions tagged as 'laravel-5'

1
answer

How to create search in Laravel getting cache data?

Since I have this data in a file I do not see why to make a request in the database. Example of my curly code: $produtos = Cache::rememberForever('produtos', function () { return DB::table('produtos') ->get(); }); $produtos =...
asked by 04.09.2018 / 19:34
1
answer

laravel- artistic key error when trying to generate

I pulled an example of a laravel project and when I give a php artisan generat:key it returns me the following error [Dotenv\Exception\InvalidFileException] Dotenv values containing spaces must be surrounded by quotes. .env: APP...
asked by 23.07.2018 / 18:57
1
answer

Laravel activitylog, implementation error

I'm following the site documentation: link , but I'm not getting it implement the option below: Setting a subject You can specify on which object the activity is performed by using performedOn: activity() ->performedOn($someContent...
asked by 07.08.2018 / 20:23
1
answer

Laravel - View [.site.Home.index] not found

I opened my localhost today to continue giving start to my project and I will get this error in all the pages that I try to access, yesterday before closing the pages was working, can anyone help me? error View [.site.Home.index] not found....
asked by 05.07.2018 / 20:59
2
answers

Sharing variables between functions in the controller

I have a function in my controller that receives some requests, and in the end everything is stored in two arrays. In this function, if I do the following: return view('negocio.detalhes-trajetoa', compact('arrayLogradourosA', 'arrayLogradouro...
asked by 03.06.2018 / 23:31
1
answer

Iterate an array to the end from a given randomly generated index - PHP / Laravel

Good evening guys. I have an array with a few bus stops with the following information: array:9 [▼ 0 => array:4 [▼ "id" => 35 "nome" => "Parada 35 - Copacabana" "endereco_completo" => "Rua Copacabana" "tempo" => 5 ] 1 => a...
asked by 03.06.2018 / 00:56
1
answer

Laravel 5.4 (1/1) TokenMismatchException

Locally all forms work, but when I put them online you are giving erro as if you did not have _token assigned to forms . APP_NAME=MonkStudio APP_ENV=production APP_KEY=base64:KV/4jmhU507Kse+PSbsBJPUwKd1vG2bFsLmN0lDCQoQ= APP...
asked by 09.04.2018 / 04:43
1
answer

CURL is not working locally

Personal I have 2 applications in Laravel 5.5 running locally. One is the API and the other is a frontend. The API I configured it as a vhost in the WAMP Server as the name api2018.local and I configured CORS in Laravel for this API route. So lo...
asked by 02.04.2018 / 17:01
2
answers

How can I handle constraint violation exception to show user friendly

What is the best way to treat an Integrity constraint violation exception to explain user friendly?     
asked by 11.06.2016 / 17:10
1
answer

How to search for the last 5 pictures inserted in the bank and show on a carousel? [closed]

I want to get the last 5 pictures in the bank and show them in a carousel, with their title, and those marks that indicate the image being viewed. I'm working with Laravel 5.1 and mySql. For more clarification, here are some tips: To search...
asked by 30.03.2018 / 14:12