Skip to content
Advertisement

Tag: migration

Image Preview from DB

I’m Trying to Preview images from database as im saving album in table albums and album images in table images and connecting with relation but i can’t preview the images from table image so i’m adding relations between the 2 tables and trying to preview the images but its not working with me something went wrong but i cannot figure

Can you delete models referenced in migrations with foreignIdFor()?

I have an old migration where I used the foreignIdFor() method to create a column. I later decided to delete the model which was referenced and now, when I do a migrate:refresh locally, that migration triggers an error saying that the model doesn’t exist, of course. So, should one never delete models referenced with foreignIdFor() and use unsignedBigInteger()instead ? EDIT:

Can’t do PHP Artisan Migrate with SQLSTATE [42000]

I just want to PHP Artisan Migrate, I’ve just completed my table on migration but have error I’ve checked my completion that there is no error or any miss spelling I’ve not added nullable because all column have to fill I’m using Laravel 8.6 and on Windows with XAMPP and MariaDB Answer The foreignId method creates an UNSIGNED BIGINT equivalent

laravel 8 migration error: Unknown column ‘batch’ in ‘order clause’ (SQL: select `migration` from `migrations` order by `batch` asc, `migration` asc)

[SOLVED] i new to Laravel and PHP. i tried to migrate my own migrations but i can’t. this my laravel and php information: my php info PHP 8.0.3 (cli) (built: Mar 4 2021 05:33:14) ( NTS ) Composer version 2.0.11 2021-02-24 Laravel 8.x mysql Server version: 10.5.9-MariaDB Arch Linux my OS info uname: Linux ali 5.4.105-1-MANJARO #1 SMP PREEMPT 2021

Laravel Migration: “ERROR Class not found”

I’m new to Laravel, I’m building a small project with five tables: users, products, category, transactions, and a pivot table category_product. When I try to run the command Php artisan migrate I receive an error class “Transaction” not found here are the tables. User Table Reset Password Table Products Table Categories Table Transactions Table Category_product Table ** The order of

Advertisement