I'm following along with laracast fundamentals. Things that should not be working, seem to be working just fine. For instance, When you create a database migration in Laravel, any field not explicitly defined as nullable, is supposed to have a null constraint. This shows in mysql:
mysql> describe articles;
+--------------+------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------------------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| title | varchar(255) | NO | | NULL | |
| body | text | NO | | NULL | |
| created_at | timestamp | NO | | 0000-00-00 00:00:00 | |
| updated_at | timestamp | NO | | 0000-00-00 00:00:00 | |
| published_at | varchar(255) | NO | | NULL | |
| excerpt | text | YES | | NULL | |
+--------------+------------------+------+-----+---------------------+----------------+
7 rows in set (0.00 sec)
In his videos, he goes to sunbmit without a published_at field and it throws an error. Mine works fine:
>>> App\Article::find(3)
=> App\Article {#734
id: "3",
title: "dtt",
body: "dtt",
created_at: "2015-11-23 01:10:05",
updated_at: "2015-11-23 01:10:05",
published_at: "",
excerpt: null,
}
I commit my data using:
public function store()
{
Article::create(Request::all());
return redirect('articles');
}