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
Tag: laravel
How to set filename mask in PhpStorm search to exclude Blade files
In my regular Laravel project I have both regular .php files with classes and .blade.php files for the templates of my project. When searching in PHPStorm with a file mask on, I have the option to filter with *.blade.php to only see my blade templates. But when I filter with *.php I find both .php files and .blade.php files because
I’m working at laravel project but there is always that error : ErrorException Creating default object from empty value
this is my candidatController.php the error is in the line before the last line($prev_canditure->etat=”archifĂ©”;) Answer From your code you can use a defensive code approach by checking if the query will return null
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
PDOException:SQLSTATE[42S22]:Column not found: 1054 Unknown column ‘tbl_destinations.id’ in ‘where clause’ in /var/www/html/…Connection.php:338
my id field in my database is des_id , how can i change it to des_id? Answer Your code looks good to me. Try setting this in your Destination Model:
Uploading image from input field and still getting validation error saying that field is required
Route Code: The Form I’m Using to Upload the File: Controller Code: Request file validation: The error I get when trying to save after selecting an Image: Trying to figure out what I’ve done wrong for hours and am so frustrated right now, please help me to resolve this issue. Thanks in advance. Answer Field in form is named gallery_img