Index: app/Http/Controllers/Auth/CreatePasswordController.php
===================================================================
--- app/Http/Controllers/Auth/CreatePasswordController.php	(revision 0924b6c75483e6a4ae83e08487635bdc25436fed)
+++ app/Http/Controllers/Auth/CreatePasswordController.php	(revision d25ba6629ddc39867a49008948daa1cedd404fc4)
@@ -36,4 +36,6 @@
         $user->save();
 
+        session()->flash("password_created", "You have created a password successfully!");
+
         return redirect()->route("auth.loginShow");
     }
Index: app/Http/Controllers/Dashboard/PostsController.php
===================================================================
--- app/Http/Controllers/Dashboard/PostsController.php	(revision 0924b6c75483e6a4ae83e08487635bdc25436fed)
+++ app/Http/Controllers/Dashboard/PostsController.php	(revision d25ba6629ddc39867a49008948daa1cedd404fc4)
@@ -5,8 +5,10 @@
 use App\Helpers\Alert;
 use App\Http\Requests\Dashboard\PostRequest;
+use App\Models\Review;
 use App\Models\Tag;
 use App\Models\Post;
 use App\Models\User;
 use App\Models\Category;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Str;
 use Illuminate\Http\Request;
@@ -91,39 +93,61 @@
     public function store(PostRequest $request)
     {
-        $post = new Post();
-        $user = auth()->user();
-        $category = Category::find($request->category);
-
-        $post->user()->associate($user);
-        $post->category()->associate($category);
-
-        $post->title = $request->title;
-
-        $image = $request->file("image");
-        $extension = $image->getClientOriginalExtension();
-        $imageName = $this->createImageName($extension);
-        Storage::disk('uploads')->put($imageName, File::get($image));
-
-        $post->image_link = $imageName;
-        $post->content = Purifier::clean($request->post_content, 'youtube');
-
-        $post->slug = $post->createSlug();
-
-        if ($post->user->hasPermission("publish_post")) {
-            $post->confirmed_by = $post->user->id;
-            $post->is_active = 1;
-            $post->is_confirmed = true;
-        }
-
-        $post->save();
-        $this->checkNewAndSaveTags($post, $request->tags);
-
-        if ($post->user->hasPermission("publish_post")) {
-            Alert::flash("New posts published successfully");
-        } else {
-            Alert::flash("New posts submitted for review successfully");
-            $adminsAndEditors = User::where("role_id", 1)->orWhere("role_id", 2)->get();
-            Notification::send($adminsAndEditors, new NewPostCreated("Have new post for review"));
-        }
+        DB::transaction(function () use ($request) {
+            $post = new Post();
+            $user = auth()->user();
+            $category = Category::find($request->category);
+
+            $post->user()->associate($user);
+            $post->category()->associate($category);
+
+            $post->title = $request->title;
+
+            $image = $request->file("image");
+            $extension = $image->getClientOriginalExtension();
+            $imageName = $this->createImageName($extension);
+            Storage::disk('uploads')->put($imageName, File::get($image));
+
+            $post->image_link = $imageName;
+            $post->content = Purifier::clean($request->post_content, 'youtube');
+
+            $post->slug = $post->createSlug();
+
+            $needReview = $post->needReview();
+
+            if (is_null($needReview)) {
+                $post->confirmed_by = $post->user->id;
+                $post->is_active = 1;
+                $post->is_confirmed = true;
+            }
+
+            $post->save();
+            $this->checkNewAndSaveTags($post, $request->tags);
+
+            if ($needReview) {
+
+                $review = new Review();
+                $review->post()->associate($post);
+                $review->postSecurity()->associate($needReview);
+                $review->current_phase = $review->postSecurity->phases()->first()->id;
+                $review->save();
+
+                Alert::flash("New posts submitted for review successfully");
+
+                Notification::send(
+                    User::whereRoleId($review->postSecurity->role->id)->get(),
+                    new NewPostCreated("Have new post for review")
+                );
+            } else {
+                Alert::flash("New posts published successfully");
+            }
+        });
+
+//        if ($post->user->hasPermission("publish_post")) {
+//            Alert::flash("New posts published successfully");
+//        } else {
+//            Alert::flash("New posts submitted for review successfully");
+//            $adminsAndEditors = User::where("role_id", 1)->orWhere("role_id", 2)->get();
+//            Notification::send($adminsAndEditors, new NewPostCreated("Have new post for review"));
+//        }
 
         return redirect()->route("dashboard.posts.create");
@@ -135,19 +159,31 @@
         $flag = false;
 
-        if (auth()->user()->hasPermission("confirm_post")) {
-            $flag = true;
-        }
-
-        if ($flag) {
-
-            $post->is_confirmed = true;
-            $post->confirmed_by = auth()->user()->id;
-
-            $post->save();
-
-            Alert::flash("Post confirmed successfully");
-
-            $post->user->notify(new PostConfirmed("Your post has been confirmed"));
-        }
+//        if (auth()->user()->hasPermission("confirm_post")) {
+//            $flag = true;
+//        }
+
+        if (!$post->review->canReview()) {
+            Alert::flash("Post need to be confirmed by " . $post->review->getCurrentReviewer()->name, "error");
+            return redirect()->back();
+        }
+
+        DB::transaction(function () use ($post) {
+
+            $post->review->increment("current_phase");
+            $post->review->save();
+
+            if (is_null($post->review->getPhase())) {
+
+                $post->review->is_passed_all_phases = true;
+                $post->review->save();
+
+                $post->is_confirmed = true;
+                $post->confirmed_by = auth()->user()->id;
+                $post->save();
+                $post->user->notify(new PostConfirmed("Your post has been confirmed"));
+            }
+        });
+
+        Alert::flash("Post confirmed successfully");
 
         return redirect()->route("dashboard.posts.index");
Index: app/Http/Controllers/Dashboard/SettingsController.php
===================================================================
--- app/Http/Controllers/Dashboard/SettingsController.php	(revision 0924b6c75483e6a4ae83e08487635bdc25436fed)
+++ app/Http/Controllers/Dashboard/SettingsController.php	(revision d25ba6629ddc39867a49008948daa1cedd404fc4)
@@ -6,9 +6,14 @@
 use App\Http\Requests\Dashboard\EmailSettingsRequest;
 use App\Http\Requests\Dashboard\PasswordSettingsRequest;
+use App\Http\Requests\Dashboard\PhaseRequest;
 use App\Http\Requests\Dashboard\PhotosSettingsRequest;
+use App\Http\Requests\Dashboard\PostSecurityRequest;
 use App\Http\Requests\Dashboard\SocialLinksSettingsRequest;
 use App\Http\Requests\Dashboard\UsernameSettingsRequest;
 use App\Http\Requests\Dashboard\UserProfileSettingsRequest;
+use App\Models\Phase;
 use App\Models\Post;
+use App\Models\PostSecurity;
+use App\Models\Role;
 use App\Models\User;
 use App\Models\UserProfile;
@@ -30,5 +35,8 @@
             "userProfile" => auth()->user()->userProfile,
             "countries" => Country::all(),
-            "adminAndEditors" => User::where("role_id", 1)->orWhere("role_id", 2)->get()
+            "adminAndEditors" => User::where("role_id", 1)->orWhere("role_id", 2)->get(),
+            "userRoles" => Role::all(),
+            "phases" => Phase::all(),
+            "postSecurities" => PostSecurity::all()
         ]);
     }
@@ -179,4 +187,66 @@
     }
 
+    public function phaseStore(PhaseRequest $request)
+    {
+        if ($request->has("phase_id") && !is_null($request->phase_id)) {
+            $phase = Phase::findOrFail($request->phase_id);
+        } else {
+            $phase = new Phase();
+        }
+
+        $phase->name = $request->name;
+        $phase->reviewer()->associate(Role::find($request->reviewer_role_id));
+        $phase->user()->associate(auth()->user());
+        $phase->save();
+
+        if ($request->has("phase_id") && !is_null($request->phase_id)) {
+            Alert::flash($phase->name . " updated successfully");
+        } else {
+            Alert::flash($phase->name . " created successfully");
+        }
+
+        return redirect()->route("dashboard.settings.index");
+    }
+
+    public function phaseDestroy($id)
+    {
+        $phase = Phase::findOrFail($id);
+        $phaseName = $phase->name;
+        $phase->delete();
+
+        Alert::flash($phaseName . " deleted successfully");
+
+        return redirect()->route("dashboard.settings.index");
+    }
+
+    public function postSecurityStore(PostSecurityRequest $request)
+    {
+        if ($request->has("post_security_id") && !is_null($request->post_security_id)) {
+            $postSecurity = PostSecurity::findOrFail($request->post_security_id);
+        } else {
+            $postSecurity = new PostSecurity();
+        }
+
+        $postSecurity->role()->associate(Role::find($request->role_id_to_be_reviewed));
+        $postSecurity->phase_ids = $request->phase_ids;
+
+        $postSecurity->save();
+
+        if ($request->has("post_security_id") && !is_null($request->post_security_id)) {
+            Alert::flash("Post security updated successfully");
+        } else {
+            Alert::flash("Post security created successfully");
+        }
+
+        return redirect()->route("dashboard.settings.index");
+    }
+
+    public function postSecurityDestroy($id)
+    {
+        PostSecurity::findOrFail($id)->delete();
+        Alert::flash("Post security deleted successfully");
+        return redirect()->route("dashboard.settings.index");
+    }
+
     private function updatePhotosHelper(Request $request, UserProfile $userProfile)
     {
Index: app/Http/Controllers/Dashboard/UsersController.php
===================================================================
--- app/Http/Controllers/Dashboard/UsersController.php	(revision 0924b6c75483e6a4ae83e08487635bdc25436fed)
+++ app/Http/Controllers/Dashboard/UsersController.php	(revision d25ba6629ddc39867a49008948daa1cedd404fc4)
@@ -10,4 +10,5 @@
 use App\Notifications\WelcomeUser;
 use App\Http\Controllers\Controller;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Storage;
 use Propaganistas\LaravelPhone\PhoneNumber;
@@ -32,28 +33,32 @@
     public function store(NewUserRequest $request)
     {
-        $user = new User();
+        DB::transaction(function () use ($request) {
 
-        $user->name = $request->name;
-        $user->surname = $request->surname;
-        $user->email = $request->email;
-        $user->country_code = $request->mobile_number_country;
-        $user->mobile_number = PhoneNumber::make($request->mobile_number, $request->mobile_number_country)->formatInternational();
-        $user->username = $request->username;
-        $user->password = $user->generateTemporaryPassword();
-        $user->security_code = $user->generateSecurityCode();
-        $user->verify_token = $user->generateVerifyToken();
+            $user = new User();
 
-        $user->role_id = $request->userRole;
+            $user->name = $request->name;
+            $user->surname = $request->surname;
+            $user->email = $request->email;
+            $user->country_code = $request->mobile_number_country;
+            $user->mobile_number = PhoneNumber::make($request->mobile_number, $request->mobile_number_country)->formatInternational();
+            $user->username = $request->username;
+            $user->password = $user->generateTemporaryPassword();
+            $user->security_code = $user->generateSecurityCode();
+            $user->verify_token = $user->generateVerifyToken();
 
-        $user->save();
+            $user->role_id = $request->userRole;
 
-        $user->userProfile()->create([
-            "profile_link" => $user->generateProfileLink($request->name, $request->surname),
-            "technoblog_email" => $user->generateTechnoblogEmail($request->name, $request->surname)
-        ]);
+            $user->save();
 
-        $user->notify(new WelcomeUser($user));
+            $user->userProfile()->create([
+                "profile_link" => $user->generateProfileLink($request->name, $request->surname),
+                "technoblog_email" => $user->generateTechnoblogEmail($request->name, $request->surname)
+            ]);
 
-        Alert::flash("New user added successfully");
+            $user->notify(new WelcomeUser($user));
+
+            Alert::flash("New user added successfully");
+
+        });
 
         return redirect()->route("dashboard.users.create");
