DEV Community

Morcos Gad
Morcos Gad

Posted on

New Things Added - Laravel 9.6 Released

Let's get started quickly I found new things in Laravel 9.6 Released I wanted to share with you.

  • Added whenTableHasColumn and whenTableDoesntHaveColumn on Schema Builder

https://github.com/laravel/framework/pull/41517

 Schema::whenTableDoesntHaveColumn('product', 'order', function (Blueprint $table) {
         $table->unsignedInteger('order')->default(0);
 });

 Schema::whenTableHasColumn('product', 'order', function (Blueprint $table) {
         $table->dropColumn('order');
 });

Enter fullscreen mode Exit fullscreen mode
 public function testMailableSetsSubjectCorrectly()
 {
     $mailable = new WelcomeMailableStub;
     $mailable->subject('foo');
     $this->assertTrue($mailable->hasSubject('foo'));
 }
Enter fullscreen mode Exit fullscreen mode

I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.
Source :- https://www.youtube.com/watch?v=dPHU_9j2RkU

Top comments (0)