This project, created by Mohammed Baobaid (m.baobaid@outlook.com), serves as a control panel where users can register, log in, create posts, and interact with them. Additionally, administrators have enhanced privileges such as managing posts and comments.
This project is specifically developed for applying to the Morph training opportunity.
-
Registration/Login: Users can register an account and log in securely.
- Example: To register, navigate to
/register
and fill in the required details.
- Example: To register, navigate to
-
Post Creation: Authenticated users can create new posts.
- Example: After logging in, access
/posts
to compose a new post.
- Example: After logging in, access
-
Edit/Delete Posts and Comments: Authenticated users have the ability to modify or delete their posts and comments.
- Example: Access your post or comment and use the provided options to edit or delete.
-
Universal Post Deletion: Administrators possess the authority to delete all posts, overriding any restrictions.
- Example: Log in with an admin account and navigate to the post you want to delete.
-
Admin-Specific Restrictions:
- Admins cannot edit any posts, except their own.
-
Admin Validation:
- Admin validation is based on email domain matching the APP_URL in the .env file, ignoring the protocol
HTTPS or HTTP
. - Example: If the APP_URL in the .env is
http://morph-1.test
, an admin's email likeadmin@morph-1.test
will grant admin privileges.
- Admin validation is based on email domain matching the APP_URL in the .env file, ignoring the protocol
- User and admin functionalities are divided to ensure security and differentiated access levels.
- Admins must adhere to the specific email domain rule for validation.
-
Clone the repository:
git clone https://github.com/devhereco/morph_1
-
Install dependencies:
composer install
-
Set up your environment variables: Copy .env.example to .env and configure your database connection and other settings.
-
Generate application key:
php artisan key:generate
-
Run Migrations:
php artisan migrate
-
Serve the application:
php artisan serve
-
Access the application via your browser at http://localhost:8000.s