Skip to content
Advertisement

Tag: laravel

Blank page issue for Laravel project in Subdomain

I am having a Blank Page issue for Laravel Project in a Sub-domain (cPanel). The root domain (https://ratul.info/) already has a Laravel application. So I was trying to upload another Laravel project in a Sub-domain (https://ecommerce.ratul.info/). Unfortunately, it was showing a White Screen with no error. Sub-domain details Subdomains: ecommerce.ratul.info Document Root: /public_html/ecommerce Files of public and index.php is in

Laravel Imports: How to replace imported row value by id?

So i have this code: PengajuanDetailController.php SubmissionDetailImport.php I wanted to make the imported row value of ‘submission_id’ equal to an id, for example: http://127.0.0.1:8000/pengajuan/4/ the row value of ‘submission_id’ becomes 4 of the “/4/” instead of the original imported value, how to do? Answer You can simply pass your Url parameter, through to the importer. Now we are needing the

Laravel Relationship with integer[] type of postgresql column

I have categories table and products table. in products table have category_id column type of integer[]. ex: {1,2,3} . And I need products list with category relation which categories.id exist products.category_id I tried in model Product: no get category is null. Answer I can’t relation but with attribute i can get categories firstly cast category_id to array and and it

Unable to run artisan command via cron in localhost [Laravel 8] [Solved] [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

Eloquent Sort By depend on the field

I have a query like this: I want to sort the result but i have problem. if the result of withMin if null i want to sort it by another field (lets say ‘product.sale_price’). Or how can i make a new field, lets say ‘final_price’, if promotion_price is null use sale_price. What i already tried: add this after get() the

Laravel – Use a column from a model relation

in my livewire view i get all the credits from their respective owners through the model relationship between clients and credits Model: Client Model: Credit in my livewire view I have a foreach that gets me all the clients, inside a switch that counts the credits of the clients Livewire: Show-client So far everything is fine, it tells me the

Advertisement