Skip to content
Advertisement

Tag: laravel

Laravel 9.x Terminal can not migrate table

Trying to migrate a users table. Already have 1 table at DB. It’s Contacts for contact form. Trying to migrate a users table. Created my table with terminal $ php artisan make:migration create_users_table Had the following code in it. When I tried to migrate the table terminal returns an error. I run php artisan migrate and it returns Migrating: create_contacts_table

How to apply Eloquent where() to child in hasMany() relationship

I want to get the results of this very simple, common SELECT statement: For the non-SQL fluent, this returns all of the columns for all parent and child rows where the child column named column contains the value 1. Using the Laravel models below, what’s the correct Eloquent way to do this? Answer You were close with your last attempt;

How to upload file using laravel vue api?

i’m trying to make a form with the ability to upload files using form i’m able to store string, int data but i’m a bit lost with the way that i need to provide for the controller and the view this is the add template: this is the database table: controller: model: app: i can provide more code if necessary

Why doesn’t my php laravel application store my image?

I’ve looked at code from other people and try to implement the same thing, but the application could not store the image to the desire folder, would you please have a look at what the reason is? Thank you! Here is my code for route: Here is my code for the php laravel template: Here is my code in the

Undefined Array Key “”

I am new to laravel so this particular error is giving me headache. I am trying use a datatable in laravel vue.js app. I have the following code in my laravel backend and when I try retrieving the data from the data, I get the Undefined array key error message in the dev tools. How do I resolve the issue

Where to store user profile id for multiple user profile 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 9 months ago. Improve this question In my laravel project, I have 2 tables as users and profiles. One user can have multiple profile. The user is

Advertisement