/Laravel-4-Msg

Primary LanguagePHPMIT LicenseMIT

Laravel-4-Msg

Build Status

Requires

  • Twitter Bootstrap 3.0.x
  • Twitter typeahead.js 0.9.3
  • Bootstrap 3 wysihtml5

Installation

Add to models/User.php:

//gcWorld/Msg
public function messages()
{
    return $this->hasMany('Msg', 'to');
}

 //gcWorld/Msg
public function sentmessages()
{
    return $this->hasMany('Msg','from');
}

Usage

Display number of unread messages

{{ Msg::getNewMsg() }}