A modern news portal built with Laravel , designed to make it easy for users to read and share news and for admins to manage content efficiently. It includes cool features like real-time notifications, fast performance, and secure user management.
πΉ Linkedin Post For That Tutorial: Live Demo
πΉ Complete Tutorial Series: Watch Now
β
Social login using OAuth [Google
, Facebook
] With SOLID design prencipals best practices[single responsability
, open-closed
, dependancy inversion
].
β Profile management: Users can view and edit their profile details (name, username, email, password,image etc.).
β
Preview post images using file-input
package and can delete the previewed images without reloading the page using jQuery
and Ajax
.
β
Make a validation on uploded number of posts in frontend using file-input
package and also in backend using custom form validation classes. [separte that logic to add clearity in post controller class]
β
Users can add comments on active posts using jQuery
and Ajax
[adding in realtime without reload the page].
β Notify post author when someone add a new comment on his/her post and display these notifications in top-navbar [realtime and database notifications using pusher websocket server and Laravel Echo to listen to realtime events].
β
Hide/show comments based on post settings[active
or inactive
when creating or updating it using jQuery
and Ajax
].
β
Real-time notifications for comments and other activities [using Pusher
, Laravel Echo
, jQuery
and Ajax
].
β Display all of unread notifications in user dashboard notification page and can select any one and mark it as read or mark all as read [that handled by using middleware]..
β Database notifications for to store user notifications [it uses UUID not incremental id for no notification redundancy].
β
Users can login via Facebook and Google [by using SOLID prencipals to make that clean single responsability
, dependancy inversion
, open-closed
].
β
OR Users can contact the website support team but via Contact-Us
page and admins will be notifyed with message in admin dashboard [realtime notification in admin dashboard and this notification stored in database].
β
Users can go to social link for website like [Google
, Facebook
, Twitter
, Instagram
, Youtube
, email
, phone
] in navbar and use service provides to handle that logic as a globla site settings .
β
In show post page make a meta discription with long description of post so when some when search can get result on Google
as first search result.
β
Adding headig in each page like H1
or H2
to rank the page in Google Search
and that also enhance SEO
.#
β
When adding a new post , edit or also delete it will forget all redis
caching keys to update latest details .
β
Main 3 latest posts in slider are cached using redis
and predis
package to give a high performance [so not required all times request a server with database query] .
β
Read More
posts section also cached using redis
and predis
package to enhance performance and give a better user experience.
β Admin receives notifications for reset requests, and OTP verification is used for password reset.
β
Admin can reset password and it will send an email notification via email with otp token [i used laravel-Otp
package to send otp and can make otp valid with specific time , number of characters and whose will be notified with that]
β Authorized admin can block user and then when this use try to login it will check it's status and will display for it a waiting list page.
β
Authorized admin can show posts details like number-of-views
, user who creates that post
, status
, comment abiliy
.
β
Authorized admin can also make the post active
or inactive
depending on status
if it becomes inactive
it will not appear in the frontend user home page .
β If Authorized admin create a new post , edit or also delete it will clear or forget all cache keys to get the latest updated posts with new details in frontend user home page.
β Super admins can assign roles and permissions to other admins, controlling access to various features.
β
Authorized admin can show modules that is allowed for him to access based on his permessions [use middleware can
and @can
blade directive to check if the auth user if authorized for that action or not and if not , it will restrict his actions].
β Authorized admin for notification page can access the all unread notifications and can mark them all as read or delete all or delete specific or also mark one as read.
β
For show realtime notifications in admin i used pusher
websocket server with laravel Echo
to listen for for pusher
notification events and jQuery
and Ajax
for realtime update content without refreshing the the page and also after that store the notification in database to make a CRUD operations on it later.
β
Authorized admin can filter posts by category, search by title, and sort by date [realtime search using jQuery
and Ajax
].
β
Authorized admin for categories managements can access all categories data like name
, status
, created_date
, number of posts in that category
.
β
Authorized admin for categories managements can active
or inactive
categories and if the category becomes inactive
it will not be appearing in the frontend user home page .
β
Authorized admin for categories managements can search for categories with name
, status
, create_date
and also sortby:id,name,created_at
and can limited the results with specifc limited number
.
β
Authorized admin for contacts managements can access all Conatcts data like name
,email
, subject
, phone
, status
, created_date
.
β
Authorized admin for contacts managements can make a contact status
as read
when click on show page of that contact or when click on notification of that contact in admin dashboard navbar it will make that notification as read and it redirect the admin to show page for contact
and also can make it's status as read.
β
Authorized admin for Site Setting managaments can update site settings data like site name
, phone
, email
, social links
, logo
, favicon
, locations
... .
β Authorized admin for edit profile managaments can edit thier profiles , change password , edit basic info , ... .
β πLaravel Breeze: Provides basic authentication features like login, registration, and password reset.
β πEloquent Eager Limit: Optimizes performance by reducing the number of queries (before: 59 queries, after: 12 queries).
git clone https://github.com/Mahmoud-Hagrass/News-Portal-And-Magazine-Website.git
First, install PHP dependencies using Composer:
composer install
Then, install Node.js dependencies using npm:
npm install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
php artisan storage:link
php artisan serve