I have a controller to add some data on my database. All is working excepted one row.
Here is my code :
View :
<div class="form-group">
<label for="exampleInputEmail1">Logo</label>
<input type="text" class="form-control" name="logo">
Controller :
Vpns::create([
'title' => $request->title,
'intro' => $request->intro,
'content' => $request->content,
'jeux' => $jeux,
'chine' => $request->chine,
'torrent' => $request->torrent,
'netflix' => $request->netflix,
'nolog' => $request->nolog,
'securite' => $request->securite,
'paiement' => $request->paiement,
'systemes' => $request->systemes,
'appareils' => $request->appareils,
'lien' => $request->lien,
'url' => $request->url,
'meilleur_prix' => $request->meilleur_prix,
'duree_abo' => $request->duree_abo,
'logo' => $request->logo]
);
In my form I put a string in row "logo" but in database it appears as "NULL", I don't know why...
Migrations :
public function up()
{
Schema::table('vpns', function (Blueprint $table) {
$table->string('logo')->nullable();
});
}
Thanks for help
My Answer:
Rate this post
3 of 5 based on 8388 votesComments