I have a question about the relationship. I have an activity model and controller. I guess I searched a lot, I find an attached method for this. But idk how to use it. I have an activity table like this: And another table is activity_asset like this: Now I don’t know how to relate these two tables. What do I
Tag: laravel
Issue with Storage on shared hosting
I am deploying my first project on a shared hosting. I followed this tutorial to deploy the website and turn the public folder into the public_html folder of my hosting plan. When I upload an image from my website (with storeAs() method), the file is uploaded in the private/storage folder, not the public one (where I would like). The asset()
Trigger PDF Download PHP – Laravel 7
I have a simple report page, and I am using Laravel 7 to build it. I want to trigger auto-download a PDF with that view. What would be the most lightweights I should look into? I did a quick Google, and I saw so many options. I decided to try this and did all the steps, below is my final
How to dynamically set a parent table when accessing a collection?
I’m trying to fetch data from dynamically different tables depending on which user is logged on and if he is allowed to edit said table, what I thought was going to work was this: And it outputs an error on the last bit of code saying “Trying to get property ‘id’ of non-object” I have been looking around for hours
Laravel : Fetch contact form data into notification facade mail
Just made a contact me form on my website and I would like to send an email to the website’s admin when someone sends a message. I’m using the Notification Façade in Laravel to do so, I managed to send the email but I can’t fetch the contact form’s data in the mail. How can I achieve that ? ContactController.php
Laravel Redirecting multiple pointed URL’s [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed last year. Improve this question I have a live site that is going to have other URL’s
Customize Laravel Default Verification Email (Change The Header)
I’m trying to change and modify the default verification email in Laravel, I’ve found the file when you can change the contents of the default email but inside the file it has only the Subject and the lines I couldn’t found the header of the email to change it, so where can I find the line of header and change
Access value of array inside another array [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed last year. Improve this question I
Get the two different objects together
I’ve got $campus_groups coming from CampusGroup which has and $campus_org_groups coming from CampusOrganizationGroup which has and would like to get both together like this (the important key is group_id and I’m ok if campus_organization_id is left out) If I merge them this is what I’m getting If I union them this is what I’m getting Answer I’ve changed to Notice
How to ensure, that column names are equal in laravel?
I am currently working on a laravel php project. In this case, a table containing countries should be created. There are three fields within the table: a short country code column called country_code and the name of the country in german and english language in the columns country_name_de and country_code_en. This results in the following model class: Further, there is