Category "laravel"

How do Laravel and Docker play together?

I want to get into Laravel development. As per Laravel's installation guide, I have installed Docker first, which was a first for me. But for me to finally inst

How to get quarter for future date using Carbon?

Simple question: How to get carbon get quarter for future date? Example: Given datetime: 2023-05-03 14:34:09 I want print which quarter will be using Carbon Not

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

everybody! I've finished a laravel project backend with postgres and it has a phpunit tests, everything it works. So, I did upload to Github. When I did "git

MongoDB Laravel works local but not on host

Would anyone know how to fix this I can't find any method that works online. My mongodb does work local but not on host. I'm using laravel with the following:

Get sum of arrays inside array

How do I get the sum of this arrays. $arrays = [[0, 176000], [0,500], [0, 3960000]]; The output should be: $arrays = [0, 4136500]; Any help will be much

PHP DRY Principle if.. statement

I am still learning and have been reading on DRY Principles for a while now, was told by my mentor that I need to adhere to the DRY principle for this code belo

PHP DRY Principle if.. statement

I am still learning and have been reading on DRY Principles for a while now, was told by my mentor that I need to adhere to the DRY principle for this code belo

How to stop the GET method is not supported for this route from showing?

I have a working Laravel project with loads of different routes. I'm currently testing it and one of my tests was to check if a user were to use a delete or pos

How to change User::Model In Laravel with User Auth in Firebase

Recently I have make Laravel auth with composer require laravel/uiand I can edit/create user with MySQL where as auth users for Firebase . I also can create/

How to change User::Model In Laravel with User Auth in Firebase

Recently I have make Laravel auth with composer require laravel/uiand I can edit/create user with MySQL where as auth users for Firebase . I also can create/

Some Bootstrap 5 colors are not working compled with Laravel Mix

I am integrating Bootstrap 5 into my Laravel project. I installed Bootstrap with NPM and complied with Laravel Mix, and it's working. However, some extra colors

Laravel Scout/Meilisearch - filter by a non-searchable column

I want to make it so that I can filter results based on a column that isn't searchable with Meilisearch and Laravel scout. So imagine a "Comment" table, with th

Laravel Livewire: jQuery not working in child component loaded via @if statement

I'm using Laravel 8 and PHP 8 and livewire 2. I have a Fullpage Livewire component. I have a button, to toggle a simple flag between false and true. <Button

Webscraping Symfony/Panther: Can't get HTML

I want to scrape a site with the symfony panther package within a Laravel application. According to the documentation https://github.com/symfony/panther#a-polym

How to make changes to Spark Laravel Billing page?

I am trying to make changes to the Spark Laravel BillingPortal.vue page. After making a change I know the the app.js is being compiled but I see no change in th

Create a new instance of a Laravel model with children models

At the moment, whenever I need to create a new instance of a Laravel model that has child models, I need to create the model in the controller, then loop over a

Laravel - 403 invalid signature on email verification

I have enabled Email verification on my laravel site. If they dont do it immediatly, but after a day or two, the link times out.. and they land on a page with

Laravel phpunit test failing authorization

I have a working api only application. I am required to write a test decided to use laravel's phpunit test. This simple app allows only authenticated users ca

How do I set the default document of an Azure App Service when it exists in a subdirectory?

I am deploying an Azure App Service from Azure DevOps via a release pipeline that is configured to perform an Azure App Service Deploy task on my build agent. T

Access relation of pivot table in Laravel

I have three models Bill, Product and Process. Bill has a ManyToMany relationship with Product and the pivot table have some extra fields. I write the Bill mode