Lavet sådan at man kan adde information til contacts databasen
This commit is contained in:
parent
419672a302
commit
ba73440044
|
@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||
class Contact extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name_first', "name_last", 'email', 'tel'
|
||||
'name_first', "name_last", 'email', 'phone'
|
||||
];
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ class ContactController extends Controller
|
|||
"name_first" => "required|max:255",
|
||||
"name_last" => "required|max:255",
|
||||
"email" => "required|max:255",
|
||||
"tel" => "required|max:255",
|
||||
"phone" => "required|max:255",
|
||||
]);
|
||||
|
||||
$contact = new Contact($requestContact);
|
||||
|
|
|
@ -13,9 +13,14 @@ class CreateContact extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('contact', function (Blueprint $table) {
|
||||
Schema::create('contacts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name_first', 255);
|
||||
$table->string('name_last', 255);
|
||||
$table->string('email', 255);
|
||||
$table->integer('phone');
|
||||
//$table->unique('email');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue