コード例 #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Anotification::create(['name' => 'Všichni uživatelé', 'description' => 'Notifikace, která je zaslána na všechny aktivní uživatele stránek.', 'type' => 'mail', 'system' => 1, 'cron' => 0]);
     Anotification::create(['name' => 'Novinky', 'description' => 'Notifikace novinek - Redaktor ručně odešle zprávu uživatelům. Neprovádí se automaticky, nezasílá robot.', 'type' => 'mail', 'system' => 0, 'cron' => 0]);
     Anotification::create(['name' => 'Stránky', 'description' => 'Notifikace stránek - Redaktor ručně odešle zprávu uživatelům. Neprovádí se automaticky, nezasílá robot.', 'type' => 'mail', 'system' => 0, 'cron' => 0]);
     Anotification::create(['name' => 'Treninková skupina', 'description' => 'Notifikace zasílán uživatelům kteří se přihlásili k odběru informací ohledně tréniku.', 'type' => 'mail', 'system' => 0, 'cron' => 0]);
 }
コード例 #2
0
 public function profile()
 {
     $roles = Auth::user()->roles()->get();
     $user = Auth::user();
     $anotifications = Auth::user()->anotifications()->get();
     //$comment = App\Comment::find(1);
     $users_n1 = Anotification::find(2)->users()->get();
     //dd($users_n1);
     return view('backend/user/profile', compact('roles', 'user', 'anotifications'));
     //return view('backend/user/profile', array('user' => Auth::user()) );
 }
コード例 #3
0
 /**
  * Notify on new Post
  *
  * @param int $id
  * @return \Illuminate\Http\Response
  */
 public function showNotifyChannels($id)
 {
     $new = Post::findOrFail($id);
     $notifyChans = Anotification::orderBy('id')->pluck('name', 'id');
     //  dd($notifyChans);
     return view('backend.posts.notify', compact('new', 'notifyChans'));
 }