Пример #1
0
 public function run()
 {
     Role::create(["hash" => blogify()->makeHash('roles', 'hash', true), "name" => "Admin"]);
     Role::create(["hash" => blogify()->makeHash('roles', 'hash', true), "name" => "Author"]);
     Role::create(["hash" => blogify()->makeHash('roles', 'hash', true), "name" => "Reviewer"]);
     Role::create(["hash" => blogify()->makeHash('roles', 'hash', true), "name" => "Member"]);
 }
Пример #2
0
 public function store(CommentRequest $request)
 {
     $comment = new Comment();
     $comment->hash = blogify()->makeHash('comments', 'hash', true);
     $comment->content = $request->comment;
     $comment->user_id = $this->auth->user()->id;
     $comment->post_id = $this->post->byHash($request->post)->id;
     $comment->revised = $this->config->approve_comments_first ? 1 : 2;
     $comment->save();
     tracert()->log('comments', $comment->id, $this->auth->user()->id, 'create');
     session()->flash('notify', ['success', 'Your comment has been added']);
     return back();
 }
 public function run()
 {
     Visibility::create(["hash" => blogify()->makeHash('visibility', 'hash', true), "name" => "Public"]);
     Visibility::create(["hash" => blogify()->makeHash('visibility', 'hash', true), "name" => "Protected"]);
     Visibility::create(["hash" => blogify()->makeHash('visibility', 'hash', true), "name" => "Private"]);
 }
Пример #4
0
 public function run()
 {
     $user = app()->make(config('auth.model'));
     $user->create(['hash' => blogify()->makeHash('users', 'hash', true), 'lastname' => $this->admin['name'], 'firstname' => $this->admin['firstname'], 'username' => $this->admin['username'], 'email' => $this->admin['email'], 'password' => Hash::make($this->admin['password']), 'role_id' => $this->admin_role, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()]);
 }
 public function run()
 {
     Status::create(["hash" => blogify()->makeHash('statuses', 'hash', true), "name" => "Draft"]);
     Status::create(["hash" => blogify()->makeHash('statuses', 'hash', true), "name" => "Pending review"]);
     Status::create(["hash" => blogify()->makeHash('statuses', 'hash', true), "name" => "Reviewed"]);
 }