Example #1
0
 public function createClientNotifacation($userID)
 {
     $notification = new Notifacation();
     $notification->userID = $userID;
     $notification->active = '1';
     $notification->message = 'New client created';
     $notification->icon = 'icon-user';
     $notification->save();
 }
Example #2
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function createClient()
 {
     $clientName = $_POST['clientName'];
     $clients = new Clients();
     $Notifacation = new Notifacation();
     $Notifacation->createClientNotifacation($this->userID());
     $clients->userID = $this->userID();
     $clients->clientName = $clientName;
     $clients->save();
     header('Location: /clients');
 }