I want to save an object with eloquent/laravel but i get error 500 there is my model code :
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Categorie extends Model
{
}
action :
public function addCategorie() {
$input = Input::all();
$categorie = new Categorie;
$categorie->libelle = $input['label'];
$categorie->save();
return $categorie;
}
when i get the print_r($categorie) after the save method i get a result , when i use the save methode i got an error 500
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire