Skip to content
Advertisement

Tag: laravel

Adding day/incrementing with a carbon formatted date

I’m using carbon to get today’s date and format it in a laravel blade template, which is not a problem at all, but when it comes to incrementing I’m having an issue I’m currently testing with just adding a single day, but I want to actually create table headers for today and the next 7 days. In my blade I

Laravel 8.53 – Routing doesnt work on any of pages

Solution The solution was found thanks to @Gert B. Simply add to your Laravel application any virtual host (I added for mine) laravel1.test How to add Virtual host: Go to C:WindowsSystem32driversetchosts add line: 127.0.0.1 laravel1.test (or your virtual host name) And add this to your vhosts(in case of using xampp) in C:xamppapacheconfextra httpd-vhosts I can’t pass the problem with routing

Laravel find rows by nested relationship column

I have 2 tables reserves and chats, chats belongTo reserves and I want to get all chats where chat.reserve.user_id = Auth::id(). How can I do that in laravel. Answer I don`t know your models name (need more code in question), but try use where ‘reserves’ your relationship and have field user_id. Maybe needed full path to field like ‘reserves’.’user_id’ Also

Get data from URL using PHP

This is incoming call API URL. so, this URL wont stop loading. this URL keep loading and give data in json format. how to get data from this kind of URL using PHP. Answer Why you used the php CURL to http request. You can use the laravel HTTP client. You can see: https://laravel.com/docs/8.x/http-client#making-requests

Handling rate limits when using an API in Laravel

In my Laravel application I am using the HubSpot API extensively to perform various actions. I have read in the documentation that you can make 150 requests per each 10 second period. To monitor this HubSpot provide the following Headers when making any API call. In my application I am making use of Laravel’s Http Client, which is basically just

How can I make a collection in Laravel, where same keys will combine?

Using Laravel 8, I want to count travelers who visit my tourist information center. Traveler comes to our info center, asks anything, our employee gives necessary information and then we ask for travelers nationality to count for the statistic reasons. For example, if the traveler is from Germany, an employee adds him into our stats table submitting a form. If

laravel get all rows using where statement

I want to get all row, but I have to use where statement. This is my code: I have to use a where statement. What should I write instead of Show all? Answer Use when: when second parameter (closure) will execute only if the first parameter is a truish expression, in your case if the city value is not equal

Individual s3 bucket for each user in laravel [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 7 months ago. Improve this question I have a Laravel application, I want to have a secure storage system for my registered users. How should I plan

Laravel take from collection with offset

I got this collection I know I can use the method take() to bring the X first elements of the collection But I was wondering, if is there a way to add an offset to the take() method or do something that produce a result like this any clue? Answer use skip method

Advertisement