Тёмный

Laravel Migration: Change Foreign Key to Nullable 

Laravel Daily
Подписаться 144 тыс.
Просмотров 12 тыс.
50% 1

Опубликовано:

 

10 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 37   
@bmtamim7818
@bmtamim7818 3 года назад
Thanks a lot sir, It help me a lot. But I follow your 'checklister task duplicate' to solve that problem, last night. You are the best.😍😍
@kremboman
@kremboman 3 года назад
You could use --table=products flag during execution of make:migration command to prefill the basic Schema with the table name.
@chlouis-girardot
@chlouis-girardot 3 года назад
Always helpfull or a good reminder, Thanks a lot Sir ! Take care !
@marcoaureliorocca
@marcoaureliorocca 9 месяцев назад
thanks a lot!!
@msdeav
@msdeav 2 года назад
thank you
@rudstoncullen3410
@rudstoncullen3410 Год назад
Very useful content thanks
@martin.j.osborne
@martin.j.osborne 11 дней назад
If you're going in the other direction --- changing a foreignId from nullable to non-nullable --- you need to do things in a slightly different order: first dropForeign, then change the id to be non-nullable ($table->unsignedBigInteger('category_id')->change();), then (re)create the foreign key.
@JohnToridas
@JohnToridas 3 года назад
Thanks for the video, very useful. Would be also good to see a video about how to set up application laravel with mysql on docker, docker is required on a lot of vaccancies, and some people struggle with it
@LaravelDaily
@LaravelDaily 3 года назад
There are so many options for docker that I can't shoot video on all of them. Just read the docker documentation and search for various docker examples how different people implement it.
@JohnToridas
@JohnToridas 3 года назад
@@LaravelDaily okay, thanks for reply
@magnus.sigvard
@magnus.sigvard Год назад
Thank you for this! I am having some trouble writing the down()/reverse function for this migration. Is it possible? Does anyone know how to do it?
@luishamedmedinavaca377
@luishamedmedinavaca377 7 месяцев назад
Did you solved it?
@luisospino4700
@luisospino4700 2 года назад
Thank's :)
@stefanilic4178
@stefanilic4178 3 года назад
Perfect like always! One question, can you make a video how to use Pusher with Livewire, maybe small chat app, something like that?
@LaravelDaily
@LaravelDaily 3 года назад
Pusher and Livewire are two different topics, you can use Pusher without Livewire. I'm planning some content around that but only later in 2021, now focused on other topics.
@stefanilic4178
@stefanilic4178 3 года назад
@@LaravelDaily Thanks for answer
@Roy-xd5mw
@Roy-xd5mw 3 года назад
Thank-you so much for content, Sir can we export data in ppt formate Like : export to excel
@togrulcalalli8134
@togrulcalalli8134 3 года назад
Hello , I have problem with wire:loading in livewire. I have global modal view-component. And inside it i have $slot for body and footer with buttons. Buttons same for all elements. Only body changes. And i am adding livewire components to modal view component. Button has wire:click and emit event inside livewire component. Inside livewire component has another wire:click. When i add wire:loading for spinner when request sent it happens in all wire:click but i want to call it in only modal confirm. My wire:loading component is also inside livewire component. When i add wire:target for it didnt happen. How can i do that?
@godsdomain.
@godsdomain. 3 года назад
Thank for the video. Pls 🙏 can you make a video on HTTP client if possible 🙏 with this api smartrecharge
@LaravelDaily
@LaravelDaily 3 года назад
Here are a few examples of HTTP Client: laravelexamples.com/tag/laravel-http-client Also made a video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-oEDDZsmMLc0.html
@nevennevenic7852
@nevennevenic7852 Год назад
Hello everyone. I think that down method is not completed on the end, or am I wrong?
@abdoreda7126
@abdoreda7126 Год назад
I think so too.
@MegaJijay
@MegaJijay 3 года назад
Sir, just want to ask, how can i backup database (lets say MySql) into another database (also mysql) and delete old records in database I got accounting app (laravel), every end of year, i have to copy all transaction records into new mysql dan make migrate fresh. What i want is the admin just click "backup" button and all the process begin automatically
@LaravelDaily
@LaravelDaily 3 года назад
Try to read the docs of Spatie Backup package, maybe they have auto-import into another DB, I don't remember now
@coderholic6741
@coderholic6741 3 года назад
how to write a factory for model when there's a relationship in the same table, like comment, parent_id referrences id of the same table? thanks.
@LaravelDaily
@LaravelDaily 3 года назад
I would write two separate seeders, for Comments with factory, and separately for Replies without factory
@spitzer4077
@spitzer4077 Год назад
Okay, but what for SQLite?
@KJARYA
@KJARYA 3 года назад
Hello Sir, how do one create a starter kits like breeze/jetstream and be able to install it in a fresh laravel project.
@LaravelDaily
@LaravelDaily 3 года назад
It took Taylor half a year to create those starter kits. And you're asking how to create something like that, in a RU-vid comment?
@KJARYA
@KJARYA 3 года назад
@@LaravelDaily I had no idea. I just wanted those auth features in a different ui and wanted few directions/guidance. I am noob sir.
@LaravelDaily
@LaravelDaily 3 года назад
If you want Laravel Auth with a different UI, then you should use Laravel Fortify. Read the docs: laravel.com/docs/8.x/fortify
@KJARYA
@KJARYA 3 года назад
@@LaravelDaily Thank you sir 🙏
@roshanmainali7791
@roshanmainali7791 3 года назад
Request ,please list yours VS Code Extensions for Laravel Developers
@msdeav
@msdeav 3 года назад
Thank you...
Далее
Two Things Laravel Services Should NOT Do
8:20
Просмотров 22 тыс.
Laravel Checkout: Database Transactions and Validation
16:24
Cleaning🤣 #shorts #トイキッズ
00:18
Просмотров 6 млн
Laravel: Create Public API with Cache and Rate Limits
12:18
The Most Legendary Programmers Of All Time
11:49
Просмотров 557 тыс.
Dev Jobs are being taken. But not by AI.
5:08
Просмотров 41 тыс.
Eloquent Soft Deletes: Things You May Not Know
10:57
Просмотров 21 тыс.
The Tools I Use to Build Products in Laravel
19:00
Просмотров 27 тыс.
A Real-Life Story About Hiring Juniors
4:11
Просмотров 3,7 тыс.
Laravel Eloquent: Deeper Relationships with One Query
10:37
Cleaning🤣 #shorts #トイキッズ
00:18
Просмотров 6 млн