There is model:
namespace App;
use Illuminate\Database\Eloquent\Model;
class Command extends Model
{
public function send($userId, $id) {}
}
I want to insert data in send method directly in model, how to do that?
I have tried:
public function send($userId, $id) {
$this->insert(["id" => $id, "userid" => $userId]);
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire