├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── Procfile ├── README.md ├── SECURITY.md ├── app ├── Console │ └── Kernel.php ├── Events │ └── BlogWasCreated.php ├── Exceptions │ └── Handler.php ├── Gamify │ ├── Badges │ │ └── FirstContribution.php │ └── Points │ │ ├── BlogCreated.php │ │ ├── BookmarkCreated.php │ │ ├── CommentCreated.php │ │ ├── LikeCreated.php │ │ └── ReplyCreated.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── IndexController.php │ │ │ ├── PermissionController.php │ │ │ └── RoleController.php │ │ ├── Auth │ │ │ ├── AuthenticatedSessionController.php │ │ │ ├── ConfirmablePasswordController.php │ │ │ ├── EmailVerificationNotificationController.php │ │ │ ├── EmailVerificationPromptController.php │ │ │ ├── NewPasswordController.php │ │ │ ├── PasswordResetLinkController.php │ │ │ ├── RegisteredUserController.php │ │ │ └── VerifyEmailController.php │ │ ├── BlogController.php │ │ ├── BlogLikeController.php │ │ ├── BlogPinController.php │ │ ├── BlogViewController.php │ │ ├── BookmarkController.php │ │ ├── CommentController.php │ │ ├── CommentLikeController.php │ │ ├── Controller.php │ │ ├── FunController.php │ │ ├── FunLikeController.php │ │ ├── FunViewController.php │ │ ├── LikeController.php │ │ ├── NotificationController.php │ │ ├── PodcastController.php │ │ ├── PrivateProfileController.php │ │ ├── PublicProfileController.php │ │ ├── ReplyController.php │ │ ├── ReplyLikeController.php │ │ ├── SubscriberController.php │ │ ├── TagController.php │ │ └── UserController.php │ ├── Kernel.php │ ├── Livewire │ │ ├── Admin │ │ │ ├── Permission │ │ │ │ └── Index.php │ │ │ ├── Role │ │ │ │ ├── Create.php │ │ │ │ ├── Edit.php │ │ │ │ ├── Index.php │ │ │ │ └── Permissions.php │ │ │ ├── Tag │ │ │ │ └── Index.php │ │ │ └── User │ │ │ │ ├── Edit.php │ │ │ │ ├── Index.php │ │ │ │ ├── Permissions.php │ │ │ │ └── Roles.php │ │ ├── Blogs │ │ │ ├── Create.php │ │ │ ├── Index.php │ │ │ ├── Manage.php │ │ │ ├── Show.php │ │ │ ├── Stats.php │ │ │ ├── Tagged.php │ │ │ └── Update.php │ │ ├── Bookmark.php │ │ ├── Comment.php │ │ ├── EditComment.php │ │ ├── EditReply.php │ │ ├── LikeBlog.php │ │ ├── LikeComment.php │ │ ├── LikeReply.php │ │ ├── NotificationIndicator.php │ │ ├── Notifications.php │ │ ├── Profile │ │ │ ├── EditProfile.php │ │ │ ├── PinBlog.php │ │ │ └── Social.php │ │ ├── Reply.php │ │ ├── Subscribe.php │ │ ├── TagInput.php │ │ ├── TopBlogs.php │ │ ├── TopTags.php │ │ ├── TopUsers.php │ │ └── users │ │ │ └── Index.php │ ├── Middleware │ │ ├── AdminPanelCheck.php │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── ValidateSignature.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── Auth │ │ └── LoginRequest.php │ │ ├── StoreBlogLikeRequest.php │ │ ├── StoreBlogPinRequest.php │ │ ├── StoreBlogRequest.php │ │ ├── StoreBlogViewRequest.php │ │ ├── StoreBookmarkRequest.php │ │ ├── StoreCommentLikeRequest.php │ │ ├── StoreCommentRequest.php │ │ ├── StoreFunLikeRequest.php │ │ ├── StoreFunRequest.php │ │ ├── StoreFunViewRequest.php │ │ ├── StoreLikeRequest.php │ │ ├── StorePodcastRequest.php │ │ ├── StoreReplyLikeRequest.php │ │ ├── StoreReplyRequest.php │ │ ├── StoreRoleRequest.php │ │ ├── StoreSubscriberRequest.php │ │ ├── StoreTagRequest.php │ │ ├── UpdateBlogLikeRequest.php │ │ ├── UpdateBlogPinRequest.php │ │ ├── UpdateBlogRequest.php │ │ ├── UpdateBlogViewRequest.php │ │ ├── UpdateBookmarkRequest.php │ │ ├── UpdateCommentLikeRequest.php │ │ ├── UpdateCommentRequest.php │ │ ├── UpdateFunLikeRequest.php │ │ ├── UpdateFunRequest.php │ │ ├── UpdateFunViewRequest.php │ │ ├── UpdateLikeRequest.php │ │ ├── UpdatePodcastRequest.php │ │ ├── UpdateReplyLikeRequest.php │ │ ├── UpdateReplyRequest.php │ │ ├── UpdateRoleRequest.php │ │ ├── UpdateSubscriberRequest.php │ │ └── UpdateTagRequest.php ├── Listeners │ ├── SendNewBlogNotification.php │ └── SendNewUserNotification.php ├── Mail │ └── NewCommentEmail.php ├── Models │ ├── Blog.php │ ├── BlogLike.php │ ├── BlogPin.php │ ├── BlogView.php │ ├── Bookmark.php │ ├── Comment.php │ ├── CommentLike.php │ ├── Fun.php │ ├── FunLike.php │ ├── FunView.php │ ├── Podcast.php │ ├── Reply.php │ ├── ReplyLike.php │ ├── Subscriber.php │ ├── Tag.php │ └── User.php ├── Notifications │ ├── NewBlog.php │ ├── NewBlogNotification.php │ └── NewUserNotification.php ├── Policies │ ├── BlogLikePolicy.php │ ├── BlogPinPolicy.php │ ├── BlogPolicy.php │ ├── BlogViewPolicy.php │ ├── BookmarkPolicy.php │ ├── CommentLikePolicy.php │ ├── CommentPolicy.php │ ├── FunLikePolicy.php │ ├── FunPolicy.php │ ├── FunViewPolicy.php │ ├── LikePolicy.php │ ├── NotificationPolicy.php │ ├── PodcastPolicy.php │ ├── ReplyLikePolicy.php │ ├── ReplyPolicy.php │ ├── SubscriberPolicy.php │ └── TagPolicy.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Traits │ ├── HasLike.php │ ├── HasSlug.php │ ├── HasUuid.php │ ├── Search.php │ └── WithAuthorization.php └── View │ └── Components │ ├── AdminLayout.php │ ├── AppLayout.php │ ├── BaseLayout.php │ ├── Buttons │ ├── Danger.php │ ├── Primary.php │ ├── Secondary.php │ └── Simple.php │ ├── Cards │ ├── BlogCard.php │ ├── PrimaryCard.php │ └── UserCard.php │ ├── Collapses │ └── Primary.php │ ├── DefaultLayout.php │ ├── Form │ └── InputField.php │ ├── Forms │ └── tinymceEditor.php │ ├── GuestLayout.php │ ├── Head │ └── tinymceConfig.php │ ├── Modals │ ├── Full.php │ └── Simple.php │ ├── Scripts │ └── Milkdown.php │ ├── Share.php │ ├── SideLink.php │ ├── Sidebar.php │ ├── Tag.php │ └── demo.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── blade-ui-kit.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── gamify.php ├── hashing.php ├── laravel-share.php ├── logging.php ├── mail.php ├── permission.php ├── queue.php ├── sanctum.php ├── seo.php ├── services.php ├── session.php ├── sluggable.php └── view.php ├── database ├── .gitignore ├── factories │ ├── BlogFactory.php │ ├── BlogLikeFactory.php │ ├── BlogPinFactory.php │ ├── BlogViewFactory.php │ ├── BookmarkFactory.php │ ├── CommentFactory.php │ ├── CommentLikeFactory.php │ ├── FunFactory.php │ ├── FunLikeFactory.php │ ├── FunViewFactory.php │ ├── LikeFactory.php │ ├── PodcastFactory.php │ ├── ReplyFactory.php │ ├── ReplyLikeFactory.php │ ├── RoleFactory.php │ ├── SubscriberFactory.php │ ├── TagFactory.php │ └── UserFactory.php ├── migrations │ ├── 2022_09_04_173938_create_users_table.php │ ├── 2022_09_04_173957_create_password_resets_table.php │ ├── 2022_09_04_174010_create_failed_jobs_table.php │ ├── 2022_09_04_174025_create_personal_access_tokens_table.php │ ├── 2022_09_04_174035_create_blogs_table.php │ ├── 2022_09_04_174109_create_funs_table.php │ ├── 2022_09_04_174200_create_subscribers_table.php │ ├── 2022_09_04_174222_create_tags_table.php │ ├── 2022_09_04_174244_create_podcasts_table.php │ ├── 2022_09_04_174303_create_comments_table.php │ ├── 2022_09_04_174319_create_comment_likes_table.php │ ├── 2022_09_04_174338_create_replies_table.php │ ├── 2022_09_04_174345_create_reply_likes_table.php │ ├── 2022_09_04_174519_create_blog_likes_table.php │ ├── 2022_09_04_174528_create_blog_views_table.php │ ├── 2022_09_04_174534_create_blog_pins_table.php │ ├── 2022_09_04_174548_create_bookmarks_table.php │ ├── 2022_09_04_174600_create_fun_likes_table.php │ ├── 2022_09_04_174608_create_fun_views_table.php │ ├── 2022_09_04_180331_create_blog_tag_table.php │ ├── 2022_09_04_180338_create_fun_tag_table.php │ ├── 2022_09_05_102301_create_subscribers_table.php │ ├── 2022_09_29_030355_create_notifications_table.php │ ├── 2022_10_05_154316_create_permission_tables.php │ ├── 2022_10_11_075341_create_seo_table.php │ ├── 2022_11_09_114403_add_reputation_field_on_user_table.php │ └── 2022_11_09_114403_create_gamify_tables.php └── seeders │ ├── AdminSeeder.php │ ├── BlogLikeSeeder.php │ ├── BlogPinSeeder.php │ ├── BlogSeeder.php │ ├── BlogViewSeeder.php │ ├── BookmarkSeeder.php │ ├── CommentLikeSeeder.php │ ├── CommentSeeder.php │ ├── DatabaseSeeder.php │ ├── FunLikeSeeder.php │ ├── FunSeeder.php │ ├── FunViewSeeder.php │ ├── LikeSeeder.php │ ├── PermissionSeeder.php │ ├── PodcastSeeder.php │ ├── ReplyLikeSeeder.php │ ├── ReplySeeder.php │ ├── RoleSeeder.php │ ├── SubscriberSeeder.php │ ├── TagSeeder.php │ └── UserSeeder.php ├── lang └── en │ ├── auth.php │ ├── pagination.php │ ├── passwords.php │ └── validation.php ├── package.json ├── phpunit.xml ├── postcss.config.js ├── public ├── .htaccess ├── build │ ├── assets │ │ ├── app.19d33af4.css │ │ ├── app.62b42b6d.js │ │ ├── app.6de49dda.css │ │ ├── material-icons-outlined.35dca8a7.woff2 │ │ ├── material-icons-outlined.8e94758c.woff │ │ ├── material-icons-round.1c135b15.woff │ │ ├── material-icons-round.c948f126.woff2 │ │ ├── material-icons-sharp.d31bfb81.woff2 │ │ ├── material-icons-sharp.fa3888ef.woff │ │ ├── material-icons-two-tone.1e673ba8.woff2 │ │ ├── material-icons-two-tone.3d34f30a.woff │ │ ├── material-icons.8265f647.woff2 │ │ └── material-icons.fd84f88b.woff │ └── manifest.json ├── favicon.ico ├── images ├── index.php ├── js │ └── share.js └── robots.txt ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── lang │ ├── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ └── vendor │ │ └── laravel-share │ │ └── en │ │ └── laravel-share-fa5.php └── views │ ├── admin │ ├── _nav.blade.php │ ├── index.blade.php │ ├── permissions │ │ └── index.blade.php │ ├── roles │ │ └── index.blade.php │ ├── tags │ │ └── index.blade.php │ └── users │ │ └── index.blade.php │ ├── auth │ ├── confirm-password.blade.php │ ├── forgot-password.blade.php │ ├── login.blade.php │ ├── register.blade.php │ ├── reset-password.blade.php │ └── verify-email.blade.php │ ├── blogs │ ├── create.blade.php │ ├── draft.blade.php │ ├── index.blade.php │ ├── manage.blade.php │ ├── sare.blade.php │ ├── show.blade.php │ ├── stats.blade.php │ ├── tagged.blade.php │ └── update.blade.php │ ├── comments │ ├── index.blade.php │ └── show.blade.php │ ├── components │ ├── application-logo.blade.php │ ├── auth-card.blade.php │ ├── auth-session-status.blade.php │ ├── auth-validation-errors.blade.php │ ├── button.blade.php │ ├── buttons │ │ ├── danger.blade.php │ │ ├── primary.blade.php │ │ ├── secondary.blade.php │ │ └── simple.blade.php │ ├── cards │ │ ├── blog-card.blade.php │ │ ├── primary-card.blade.php │ │ └── user-card.blade.php │ ├── collapses │ │ └── primary.blade.php │ ├── demo.blade.php │ ├── dropdown-link.blade.php │ ├── dropdown.blade.php │ ├── form │ │ └── input-field.blade.php │ ├── forms │ │ └── tinymce-editor.blade.php │ ├── head │ │ └── tinymce-config.blade.php │ ├── input.blade.php │ ├── label.blade.php │ ├── milkdown.blade.php │ ├── modals │ │ ├── full.blade.php │ │ └── simple.blade.php │ ├── nav-link.blade.php │ ├── responsive-nav-link.blade.php │ ├── scripts │ │ └── milkdown.blade.php │ ├── share.blade.php │ ├── side-link.blade.php │ ├── sidebar.blade.php │ └── tag.blade.php │ ├── dashboard.blade.php │ ├── errors │ ├── 401.blade.php │ ├── 403.blade.php │ ├── 404.blade.php │ ├── 419.blade.php │ ├── 429.blade.php │ ├── 500.blade.php │ ├── 503.blade.php │ ├── layout.blade.php │ └── minimal.blade.php │ ├── layouts │ ├── admin.blade.php │ ├── app.blade.php │ ├── base.blade.php │ ├── default.blade.php │ ├── guest.blade.php │ └── navigation.blade.php │ ├── livewire │ ├── admin │ │ ├── permission │ │ │ └── index.blade.php │ │ ├── role │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── index.blade.php │ │ │ └── permissions.blade.php │ │ ├── tag │ │ │ └── index.blade.php │ │ └── user │ │ │ ├── edit.blade.php │ │ │ ├── index.blade.php │ │ │ ├── permissions.blade.php │ │ │ └── roles.blade.php │ ├── blogs │ │ ├── create.blade.php │ │ ├── index.blade.php │ │ ├── manage.blade.php │ │ ├── show.blade.php │ │ ├── stats.blade.php │ │ ├── tagged.blade.php │ │ └── update.blade.php │ ├── bookmark.blade.php │ ├── comment.blade.php │ ├── edit-comment.blade.php │ ├── edit-reply.blade.php │ ├── like-blog.blade.php │ ├── like-comment.blade.php │ ├── like-reply.blade.php │ ├── notification-indicator.blade.php │ ├── notifications.blade.php │ ├── profile │ │ ├── edit-profile.blade.php │ │ ├── pin-blog.blade.php │ │ └── social.blade.php │ ├── reply.blade.php │ ├── subscribe.blade.php │ ├── tag-input.blade.php │ ├── top-blogs.blade.php │ ├── top-tags.blade.php │ ├── top-users.blade.php │ └── users │ │ └── index.blade.php │ ├── notifications │ └── index.blade.php │ ├── profile │ ├── private │ │ ├── _blog.blade.php │ │ ├── _bookmark.blade.php │ │ ├── _comment.blade.php │ │ ├── _draft.blade.php │ │ ├── _follower.blade.php │ │ ├── _following.blade.php │ │ ├── _password.blade.php │ │ ├── _pin.blade.php │ │ ├── _podcast.blade.php │ │ ├── _profile.blade.php │ │ ├── _social.blade.php │ │ ├── _tag.blade.php │ │ └── index.blade.php │ └── public │ │ ├── _about.blade.php │ │ ├── _blog.blade.php │ │ ├── _bookmark.blade.php │ │ └── index.blade.php │ ├── search │ └── index.blade.php │ ├── tags │ └── index.blade.php │ ├── users │ └── index.blade.php │ ├── vendor │ ├── livewire │ │ ├── bootstrap.blade.php │ │ ├── simple-bootstrap.blade.php │ │ ├── simple-tailwind.blade.php │ │ └── tailwind.blade.php │ ├── notifications │ │ ├── blog.blade.php │ │ └── email.blade.php │ └── pagination │ │ ├── bootstrap-4.blade.php │ │ ├── bootstrap-5.blade.php │ │ ├── default.blade.php │ │ ├── livewire-tailwind.blade.php │ │ ├── semantic-ui.blade.php │ │ ├── simple-bootstrap-4.blade.php │ │ ├── simple-bootstrap-5.blade.php │ │ ├── simple-default.blade.php │ │ ├── simple-tailwind.blade.php │ │ └── tailwind.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── auth.php ├── channels.php ├── console.php └── web.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── debugbar │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── CreatesApplication.php ├── Feature │ ├── Auth │ │ ├── AuthenticationTest.php │ │ ├── EmailVerificationTest.php │ │ ├── PasswordConfirmationTest.php │ │ ├── PasswordResetTest.php │ │ └── RegistrationTest.php │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── vite.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=laravel 15 | DB_USERNAME=root 16 | DB_PASSWORD= 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=file 20 | FILESYSTEM_DISK=local 21 | QUEUE_CONNECTION=sync 22 | SESSION_DRIVER=file 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=smtp 32 | MAIL_HOST=mailhog 33 | MAIL_PORT=1025 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS="hello@example.com" 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | AWS_ACCESS_KEY_ID= 41 | AWS_SECRET_ACCESS_KEY= 42 | AWS_DEFAULT_REGION=us-east-1 43 | AWS_BUCKET= 44 | AWS_USE_PATH_STYLE_ENDPOINT=false 45 | 46 | PUSHER_APP_ID= 47 | PUSHER_APP_KEY= 48 | PUSHER_APP_SECRET= 49 | PUSHER_HOST= 50 | PUSHER_PORT=443 51 | PUSHER_SCHEME=https 52 | PUSHER_APP_CLUSTER=mt1 53 | 54 | VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 55 | VITE_PUSHER_HOST="${PUSHER_HOST}" 56 | VITE_PUSHER_PORT="${PUSHER_PORT}" 57 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" 58 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 59 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | Homestead.json 10 | Homestead.yaml 11 | auth.json 12 | npm-debug.log 13 | yarn-error.log 14 | /.idea 15 | /.vscode 16 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | Please note we have a code of conduct, please follow it in all your interactions with the project. 7 | 8 | ## Pull Request Process 9 | 10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a 11 | build. 12 | 2. Update the [README.md](README.md) with details of changes to the interface, this includes new environment 13 | variables, exposed ports, useful file locations and container parameters. 14 | 3. Increase the version numbers in any examples files and the README.md to the new version that this 15 | Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). 16 | 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you 17 | do not have permission to do that, you may request the second reviewer to merge it for you. 18 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: vendor/bin/heroku-php-apache2 public/ 2 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 19 | } 20 | 21 | /** 22 | * Register the commands for the application. 23 | * 24 | * @return void 25 | */ 26 | protected function commands() 27 | { 28 | $this->load(__DIR__.'/Commands'); 29 | 30 | require base_path('routes/console.php'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Events/BlogWasCreated.php: -------------------------------------------------------------------------------- 1 | , \Psr\Log\LogLevel::*> 14 | */ 15 | protected $levels = [ 16 | // 17 | ]; 18 | 19 | /** 20 | * A list of the exception types that are not reported. 21 | * 22 | * @var array> 23 | */ 24 | protected $dontReport = [ 25 | // 26 | ]; 27 | 28 | /** 29 | * A list of the inputs that are never flashed to the session on validation exceptions. 30 | * 31 | * @var array 32 | */ 33 | protected $dontFlash = [ 34 | 'current_password', 35 | 'password', 36 | 'password_confirmation', 37 | ]; 38 | 39 | /** 40 | * Register the exception handling callbacks for the application. 41 | * 42 | * @return void 43 | */ 44 | public function register() 45 | { 46 | $this->reportable(function (Throwable $e) { 47 | // 48 | }); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/Gamify/Badges/FirstContribution.php: -------------------------------------------------------------------------------- 1 | getPoints() >= 80; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Gamify/Points/BlogCreated.php: -------------------------------------------------------------------------------- 1 | subject = $subject; 24 | } 25 | 26 | /** 27 | * User who will be receive points 28 | * 29 | * @return mixed 30 | */ 31 | public function payee() 32 | { 33 | return $this->getSubject()->user; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Gamify/Points/BookmarkCreated.php: -------------------------------------------------------------------------------- 1 | subject = $subject; 24 | } 25 | 26 | /** 27 | * User who will be receive points 28 | * 29 | * @return mixed 30 | */ 31 | public function payee() 32 | { 33 | return $this->getSubject()->user; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Gamify/Points/CommentCreated.php: -------------------------------------------------------------------------------- 1 | subject = $subject; 24 | } 25 | 26 | /** 27 | * User who will be receive points 28 | * 29 | * @return mixed 30 | */ 31 | public function payee() 32 | { 33 | return $this->getSubject()->user; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Gamify/Points/LikeCreated.php: -------------------------------------------------------------------------------- 1 | subject = $subject; 24 | } 25 | 26 | /** 27 | * User who will be receive points 28 | * 29 | * @return mixed 30 | */ 31 | public function payee() 32 | { 33 | return $this->getSubject()->user; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Gamify/Points/ReplyCreated.php: -------------------------------------------------------------------------------- 1 | subject = $subject; 24 | } 25 | 26 | /** 27 | * User who will be receive points 28 | * 29 | * @return mixed 30 | */ 31 | public function payee() 32 | { 33 | return $this->getSubject()->user; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/IndexController.php: -------------------------------------------------------------------------------- 1 | user()->can('access users')) 17 | { 18 | abort(403); 19 | } 20 | return view('admin.users.index'); 21 | } 22 | public function tags() 23 | { 24 | if (!auth()->user()->can('access tags')) 25 | { 26 | abort(403); 27 | } 28 | return view('admin.tags.index'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/PermissionController.php: -------------------------------------------------------------------------------- 1 | user()->can('access permissions')) 14 | { 15 | abort(403); 16 | } 17 | return view('admin.permissions.index'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/RoleController.php: -------------------------------------------------------------------------------- 1 | user()->can('access roles')) 14 | { 15 | abort(403); 16 | } 17 | 18 | return view('admin.roles.index'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmablePasswordController.php: -------------------------------------------------------------------------------- 1 | validate([ 32 | 'email' => $request->user()->email, 33 | 'password' => $request->password, 34 | ])) { 35 | throw ValidationException::withMessages([ 36 | 'password' => __('auth.password'), 37 | ]); 38 | } 39 | 40 | $request->session()->put('auth.password_confirmed_at', time()); 41 | 42 | return redirect()->intended(RouteServiceProvider::HOME); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/EmailVerificationNotificationController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail()) { 20 | return redirect()->intended(RouteServiceProvider::HOME); 21 | } 22 | 23 | $request->user()->sendEmailVerificationNotification(); 24 | 25 | return back()->with('status', 'verification-link-sent'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/EmailVerificationPromptController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail() 20 | ? redirect()->intended(RouteServiceProvider::HOME) 21 | : view('auth.verify-email'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerifyEmailController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail()) { 21 | return redirect()->intended(RouteServiceProvider::HOME.'?verified=1'); 22 | } 23 | 24 | if ($request->user()->markEmailAsVerified()) { 25 | event(new Verified($request->user())); 26 | } 27 | 28 | return redirect()->intended(RouteServiceProvider::HOME.'?verified=1'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | role = $role; 16 | $this->name = $role->name; 17 | $this->editRole=false; 18 | } 19 | public function showModal(){ 20 | if(!auth()->user()->can('edit roles')) { 21 | return abort(403); 22 | } 23 | $this->editRole=!$this->editRole; 24 | } 25 | protected $rules = [ 26 | 'name' => ['required', 'min:3'], 27 | ]; 28 | public function render() 29 | { 30 | return view('livewire.admin.role.edit'); 31 | } 32 | public function update(Role $role) 33 | { 34 | if(!auth()->user()->can('edit roles')) { 35 | return abort(403); 36 | } 37 | $this->validate(); 38 | $role->update(["name" => $this->name]); 39 | $this->reset(['name']); 40 | $this->emit('roleUpdated'); 41 | $this->editRole=false; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Http/Livewire/Admin/Role/Permissions.php: -------------------------------------------------------------------------------- 1 | role_id = $role_id; 17 | $this->assignPermission=false; 18 | } 19 | public function showModal(){ 20 | $this->assignPermission=!$this->assignPermission; 21 | } 22 | public function render() 23 | { 24 | $this->role=Role::find($this->role_id); 25 | $this->permissions = Permission::all(); 26 | return view('livewire.admin.role.permissions'); 27 | } 28 | public function assignPermission(Permission $permission, Role $role) 29 | { 30 | if(!auth()->user()->can('assign permissions')) { 31 | return abort(403); 32 | } 33 | $permission->assignRole($role); 34 | } 35 | public function removePermission(Permission $permission, Role $role) 36 | { 37 | if(!auth()->user()->can('assign permissions')) { 38 | return abort(403); 39 | } 40 | $role->revokePermissionTo($permission); 41 | // $this->reset(['role']); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Http/Livewire/Admin/User/Edit.php: -------------------------------------------------------------------------------- 1 | '$refresh']; 13 | public function render() 14 | { 15 | $users = User::paginate(20); 16 | return view('livewire.admin.user.index')->with(["users" => $users]); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Livewire/Admin/User/Permissions.php: -------------------------------------------------------------------------------- 1 | user_id = $user_id; 18 | $this->assignRole=false; 19 | } 20 | public function showModal(){ 21 | $this->assignRole=!$this->assignRole; 22 | } 23 | protected $rules = [ 24 | 'name' => ['required', 'min:3'], 25 | ]; 26 | public function render() 27 | { 28 | $this->user=User::find($this->user_id); 29 | $this->roles=Role::all(); 30 | return view('livewire.admin.user.roles'); 31 | } 32 | public function assignRole(Role $role,User $user) 33 | { 34 | if(!auth()->user()->can('assign roles')) { 35 | return abort(403); 36 | } 37 | $user->assignRole($role); 38 | } 39 | public function removeRole(Role $role, User $user) 40 | { 41 | if(!auth()->user()->can('assign roles')) { 42 | return abort(403); 43 | } 44 | $user->removeRole($role); 45 | // $this->reset(['role']); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Http/Livewire/Blogs/Index.php: -------------------------------------------------------------------------------- 1 | ['except' => 'recent'] 16 | ]; 17 | 18 | public function render() 19 | { 20 | if ($this->validSort($this->tab)) { 21 | $blogs = Blog::published()->{$this->tab}()->paginate(10); 22 | } else { 23 | $this->tab = 'recent'; 24 | $blogs = Blog::published()->{$this->tab}()->paginate(10); 25 | } 26 | 27 | return view('livewire.blogs.index')->with(["blogs" => $blogs, "tab" => $this->tab]); 28 | } 29 | public function sortBy($sort): void 30 | { 31 | $this->tab = $this->validSort($sort) ? $sort : 'recent'; 32 | } 33 | public function validSort($sort): bool 34 | { 35 | return in_array($sort, [ 36 | 'recent', 37 | 'popular', 38 | 'view' 39 | ]); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Http/Livewire/Blogs/Show.php: -------------------------------------------------------------------------------- 1 | blog=$blog; 14 | } 15 | public function render() 16 | { 17 | return view('livewire.blogs.stats'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Livewire/EditComment.php: -------------------------------------------------------------------------------- 1 | comment_id = $comment_id; 18 | $this->message=$message; 19 | } 20 | public function render() 21 | { 22 | return view('livewire.edit-comment'); 23 | } 24 | public function update() 25 | { 26 | $comment = Comment::find($this->comment_id); 27 | $this->authorize('update', $comment); 28 | $comment->update(['body' => $this->message]); 29 | $this->emit('edited'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Livewire/EditReply.php: -------------------------------------------------------------------------------- 1 | reply_id = $reply_id; 17 | $this->body=$body; 18 | } 19 | public function render() 20 | { 21 | return view('livewire.edit-reply'); 22 | } 23 | public function update() 24 | { 25 | 26 | $reply = Reply::find($this->reply_id); 27 | $this->authorize('update', $reply); 28 | $reply->update(['body' => $this->body]); 29 | $this->emit('replyEdited'); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Livewire/NotificationIndicator.php: -------------------------------------------------------------------------------- 1 | '$refresh', 12 | ]; 13 | public function render() :view 14 | { 15 | return view('livewire.notification-indicator'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Livewire/TagInput.php: -------------------------------------------------------------------------------- 1 | with(["searchTags" => Tag::query()->where('title', 'LIKE', $this->search)->take(5)->get()]); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Http/Livewire/TopBlogs.php: -------------------------------------------------------------------------------- 1 | blogs =Blog::select(['id', 'title', 'created_at'])->published()->withCount('blogviews')->orderByDesc('blogviews_count')->limit(5)->get(); 14 | } 15 | public function render() 16 | { 17 | return view('livewire.top-blogs',["topBlogs"=>$this->blogs]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Livewire/TopTags.php: -------------------------------------------------------------------------------- 1 | tags = Tag::select(['id','title','color'])->withCount(['blogs' => function ($q) { 14 | $q->published(); 15 | }])->orderByDesc('blogs_count')->limit(10)->get(); 16 | } 17 | public function render() 18 | { 19 | return view('livewire.top-tags',["topTags"=>$this->tags]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Livewire/TopUsers.php: -------------------------------------------------------------------------------- 1 | users = User::select(['id','username','profile_image'])->limit(5)->get(); 14 | } 15 | public function render() 16 | { 17 | return view('livewire.top-users',["topUsers"=>$this->users]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Livewire/users/Index.php: -------------------------------------------------------------------------------- 1 | ['except' => 'recent'] 16 | // ]; 17 | 18 | public function render() 19 | { 20 | // if ($this->validSort($this->tab)) { 21 | // $users = User::paginate(10); 22 | // } else { 23 | // $this->tab = 'recent'; 24 | // $users = User::paginate(10); 25 | // } 26 | $users = User::paginate(10); 27 | return view('livewire.users.index')->with(["users" => $users]); 28 | } 29 | // public function sortBy($sort): void 30 | // { 31 | // $this->tab = $this->validSort($sort) ? $sort : 'recent'; 32 | // } 33 | // public function validSort($sort): bool 34 | // { 35 | // return in_array($sort, [ 36 | // 'recent', 37 | // 'popular', 38 | // 'view' 39 | // ]); 40 | // } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Middleware/AdminPanelCheck.php: -------------------------------------------------------------------------------- 1 | can('admin access')) { 22 | return $next($request); 23 | } else { 24 | return redirect()->route('home'); 25 | } 26 | } else { 27 | return redirect()->route('home'); 28 | } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts() 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | |string|null 14 | */ 15 | protected $proxies; 16 | 17 | /** 18 | * The headers that should be used to detect proxies. 19 | * 20 | * @var int 21 | */ 22 | protected $headers = 23 | Request::HEADER_X_FORWARDED_FOR | 24 | Request::HEADER_X_FORWARDED_HOST | 25 | Request::HEADER_X_FORWARDED_PORT | 26 | Request::HEADER_X_FORWARDED_PROTO | 27 | Request::HEADER_X_FORWARDED_AWS_ELB; 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/ValidateSignature.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 'fbclid', 16 | // 'utm_campaign', 17 | // 'utm_content', 18 | // 'utm_medium', 19 | // 'utm_source', 20 | // 'utm_term', 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreBlogLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreBlogPinRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreBlogRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | 'cover_image'=>['required','mimes:png,jpg,svg,gif','max:2048'], 28 | 'title'=>['required','max:200','min:20'], 29 | 'body'=>['required','min:20'] 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreBlogViewRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreBookmarkRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreCommentLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreCommentRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreFunLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreFunRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreFunViewRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StorePodcastRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreReplyLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreReplyRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreRoleRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreSubscriberRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreTagRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateBlogLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateBlogPinRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateBlogRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateBlogViewRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateBookmarkRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateCommentLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateCommentRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateFunLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateFunRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateFunViewRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdatePodcastRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateReplyLikeRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateReplyRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateRoleRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateSubscriberRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateTagRequest.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Listeners/SendNewBlogNotification.php: -------------------------------------------------------------------------------- 1 | blog->user->subscribers; 32 | 33 | Notification::send($users, new NewBlogNotification($event->blog,$event->blog->user)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Listeners/SendNewUserNotification.php: -------------------------------------------------------------------------------- 1 | user)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Mail/NewCommentEmail.php: -------------------------------------------------------------------------------- 1 | view('view.name'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Models/BlogLike.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 13 | } 14 | public function blog(){ 15 | return $this->belongsTo(Blog::class); 16 | } 17 | 18 | protected $fillable = [ 19 | 'blog_id', 20 | 'user_id', 21 | 'status' 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /app/Models/BlogPin.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 13 | } 14 | public function blog(){ 15 | return $this->belongsTo(Blog::class); 16 | } 17 | 18 | protected $fillable = [ 19 | 'blog_id', 20 | 'user_id', 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /app/Models/BlogView.php: -------------------------------------------------------------------------------- 1 | belongsTo(Blog::class); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/Models/Bookmark.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 13 | } 14 | public function blog(){ 15 | return $this->belongsTo(Blog::class); 16 | } 17 | 18 | protected $fillable = [ 19 | 'blog_id', 20 | 'user_id', 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /app/Models/CommentLike.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 13 | } 14 | public function comment(){ 15 | return $this->belongsTo(Comment::class); 16 | } 17 | 18 | protected $fillable = [ 19 | 'comment_id', 20 | 'user_id', 21 | 'status' 22 | ]; 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/Models/Fun.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 14 | } 15 | public function tags() 16 | { 17 | return $this->belongsToMany(Tag::class,'tag_video', 'video_id', 'tag_id'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/FunLike.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 14 | } 15 | public function episodes() 16 | { 17 | return $this->hasMany(Episode::class); 18 | } 19 | protected $fillable = [ 20 | 'user_id', 21 | 'title', 22 | 'description', 23 | "number_episode", 24 | ]; 25 | } 26 | -------------------------------------------------------------------------------- /app/Models/ReplyLike.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 13 | } 14 | public function reply(){ 15 | return $this->belongsTo(Blog::class); 16 | } 17 | 18 | protected $fillable = [ 19 | 'reply_id', 20 | 'user_id', 21 | 'status' 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /app/Models/Subscriber.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 13 | } 14 | // public function follower(){ 15 | // return $this->belongsTo(User::class); 16 | // } 17 | protected $fillable=[ 18 | 'user_id', 19 | "subscriber_id", 20 | "status", 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /app/Policies/NotificationPolicy.php: -------------------------------------------------------------------------------- 1 | notifiable->is($user); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | ', '@', '(', ')', '~']; 14 | $term = str_replace($reservedSymbols, '', $term); 15 | 16 | $words = explode(' ', $term); 17 | foreach($words as $idx => $word) { 18 | // Add operators so we can leverage the boolean mode of 19 | // fulltext indices. 20 | $words[$idx] = "+" . $word . "*"; 21 | } 22 | $term = implode(' ', $words); 23 | return $term; 24 | } 25 | 26 | protected function scopeSearch($query, $term) { 27 | $columns = implode(',', $this->searchable); 28 | // Boolean mode allows us to match john* for words starting with john 29 | // (https://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html) 30 | $query->where($columns,'LIKE',$this->buildWildCards($term)); 31 | // Raw( 32 | // // "MATCH ({$columns}) AGAINST (? IN BOOLEAN MODE)", 33 | // $this->buildWildCards($term) 34 | // ); 35 | return $query; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Traits/WithAuthorization.php: -------------------------------------------------------------------------------- 1 | employee); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/View/Components/AdminLayout.php: -------------------------------------------------------------------------------- 1 | page = $page; 18 | } 19 | 20 | public function render() 21 | { 22 | return view('layouts.app'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/View/Components/BaseLayout.php: -------------------------------------------------------------------------------- 1 | page=$page; 18 | } 19 | 20 | /** 21 | * Get the view / contents that represent the component. 22 | * 23 | * @return \Illuminate\Contracts\View\View|\Closure|string 24 | */ 25 | public function render() 26 | { 27 | return view('layouts.base'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/View/Components/Buttons/Danger.php: -------------------------------------------------------------------------------- 1 | modal=$modal; 18 | } 19 | /** 20 | * Get the view / contents that represent the component. 21 | * 22 | * @return \Illuminate\Contracts\View\View|\Closure|string 23 | */ 24 | public function render() 25 | { 26 | return view('components.modals.full'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/View/Components/Modals/Simple.php: -------------------------------------------------------------------------------- 1 | modal=$modal; 18 | } 19 | 20 | /** 21 | * Get the view / contents that represent the component. 22 | * 23 | * @return \Illuminate\Contracts\View\View|\Closure|string 24 | */ 25 | public function render() 26 | { 27 | return view('components.modals.simple'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/View/Components/Scripts/Milkdown.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/gamify.php: -------------------------------------------------------------------------------- 1 | '\App\Models\User', 6 | 7 | // Reputation model 8 | 'reputation_model' => '\QCod\Gamify\Reputation', 9 | 10 | // Allow duplicate reputation points 11 | 'allow_reputation_duplicate' => true, 12 | 13 | // Broadcast on private channel 14 | 'broadcast_on_private_channel' => true, 15 | 16 | // Channel name prefix, user id will be suffixed 17 | 'channel_name' => 'user.reputation.', 18 | 19 | // Badge model 20 | 'badge_model' => '\QCod\Gamify\Badge', 21 | 22 | // Where all badges icon stored 23 | 'badge_icon_folder' => 'images/badges/', 24 | 25 | // Extention of badge icons 26 | 'badge_icon_extension' => '.svg', 27 | 28 | // All the levels for badge 29 | 'badge_levels' => [ 30 | 'beginner' => 1, 31 | 'intermediate' => 2, 32 | 'advanced' => 3, 33 | ], 34 | 35 | // Default level 36 | 'badge_default_level' => 1 37 | ]; 38 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | 'scheme' => 'https', 22 | ], 23 | 24 | 'postmark' => [ 25 | 'token' => env('POSTMARK_TOKEN'), 26 | ], 27 | 28 | 'ses' => [ 29 | 'key' => env('AWS_ACCESS_KEY_ID'), 30 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 31 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 32 | ], 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /database/factories/BlogFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class BlogFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition() 19 | { 20 | $title=$this->faker->text(30); 21 | return [ 22 | 'title'=>$title, 23 | 'body'=>$this->faker->realText(), 24 | 'published'=>$this->faker->boolean(), 25 | 'slug'=> SlugService::createSlug(Blog::class, 'slug', $title), 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/factories/BlogLikeFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class BlogLikeFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/BlogPinFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class BlogPinFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/BlogViewFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class BlogViewFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/BookmarkFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class BookmarkFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/CommentFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class CommentFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | 'body'=>$this->faker->realText(200), 21 | 'user_id'=>$this->faker->randomNumber(1,100), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/CommentLikeFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class CommentLikeFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/FunFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class FunFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | 'link'=>"https://picsum.photos/id/237/200/300", 21 | 'description'=>$this->faker->realText(), 22 | 'type'=>$this->faker->randomElement(['public', 'private',"subscriber"]), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/factories/FunLikeFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class FunLikeFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/FunViewFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class FunViewFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/LikeFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class LikeFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/PodcastFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class PodcastFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | 'title'=>$this->faker->realText(40), 21 | 'description'=>$this->faker->realText(250), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/ReplyFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ReplyFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | 'body'=>$this->faker->realText(200), 21 | 'user_id'=>$this->faker->randomNumber(1,100), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/ReplyLikeFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ReplyLikeFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/RoleFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class RoleFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/SubscriberFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class SubscriberFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/TagFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class TagFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition() 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_173957_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174010_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174025_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 19 | $table->morphs('tokenable'); 20 | $table->string('name'); 21 | $table->string('token', 64)->unique(); 22 | $table->text('abilities')->nullable(); 23 | $table->timestamp('last_used_at')->nullable(); 24 | $table->timestamp('expires_at')->nullable(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('personal_access_tokens'); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174109_create_funs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->uuid('uuid')->nullable()->unique(); 19 | $table->string('link')->nullable(); 20 | $table->foreignId('user_id') 21 | ->constrained("users") 22 | ->onUpdate('cascade'); 23 | $table->text('description'); 24 | $table->enum("type", ['public', 'private','subscriber']); 25 | $table->boolean("pinned")->default(false); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('funs'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174200_create_subscribers_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id') 19 | ->constrained("users") 20 | ->onUpdate('cascade'); 21 | $table->foreignId('subscriber_id') 22 | ->constrained("users") 23 | ->onUpdate('cascade'); 24 | $table->boolean('status'); 25 | //1 -> followed 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('subscribers'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174222_create_tags_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->uuid('uuid')->nullable()->unique(); 19 | $table->string('title')->unique(); 20 | $table->text('description')->nullable(); 21 | $table->string('color')->nullable(); 22 | $table->string('slug')->nullable(); 23 | $table->foreignId('user_id')->nullable() 24 | ->constrained("users") 25 | ->onUpdate('cascade'); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('tags'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174244_create_podcasts_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::dropIfExists('podcasts'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174303_create_comments_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->uuid('uuid')->nullable()->unique(); 19 | $table->text('body'); 20 | $table->foreignId('blog_id') 21 | ->constrained("blogs") 22 | ->onUpdate('cascade'); 23 | $table->foreignId('user_id') 24 | ->constrained("users") 25 | ->onUpdate('cascade'); 26 | $table->softDeletes(); 27 | $table->timestamps(); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('comments'); 39 | 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174319_create_comment_likes_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id') 19 | ->constrained("users") 20 | ->onUpdate('cascade'); 21 | $table->foreignId('comment_id') 22 | ->constrained("comments") 23 | ->onUpdate('cascade'); 24 | $table->boolean('status'); 25 | 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('comment_likes'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174338_create_replies_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->uuid('uuid')->nullable()->unique(); 19 | $table->text('body'); 20 | $table->foreignId('comment_id') 21 | ->constrained("comments") 22 | ->onUpdate('cascade'); 23 | $table->foreignId('user_id') 24 | ->constrained("users") 25 | ->onUpdate('cascade') 26 | ->onDelete('cascade'); 27 | $table->softDeletes(); 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('replies'); 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174345_create_reply_likes_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id') 19 | ->constrained("users") 20 | ->onUpdate('cascade'); 21 | $table->foreignId('reply_id') 22 | ->constrained("replies") 23 | ->onUpdate('cascade'); 24 | $table->boolean('status'); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('reply_likes'); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174519_create_blog_likes_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id') 19 | ->constrained("users") 20 | ->onUpdate('cascade'); 21 | $table->foreignId('blog_id') 22 | ->constrained("blogs") 23 | ->onUpdate('cascade'); 24 | $table->boolean('status'); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('blog_likes'); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174528_create_blog_views_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('blog_id') 19 | ->constrained("blogs") 20 | ->onUpdate('cascade'); 21 | $table->string('ip_address', 45); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('blog_views'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174534_create_blog_pins_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id') 19 | ->constrained("users") 20 | ->onUpdate('cascade'); 21 | $table->foreignId('blog_id') 22 | ->constrained("blogs") 23 | ->onUpdate('cascade'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('blog_pins'); 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174548_create_bookmarks_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('user_id') 19 | ->constrained("users") 20 | ->onUpdate('cascade'); 21 | $table->foreignId('blog_id') 22 | ->constrained("blogs") 23 | ->onUpdate('cascade'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('bookmarks'); 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174600_create_fun_likes_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->uuid('uuid')->nullable()->unique(); 19 | $table->string('link')->nullable(); 20 | $table->foreignId('user_id') 21 | ->constrained("users") 22 | ->onUpdate('cascade'); 23 | $table->text('description'); 24 | $table->enum("type", ['public', 'private','subscriber']); 25 | $table->boolean("pinned")->default(false); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('fun_likes'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_174608_create_fun_views_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('fun_id') 19 | ->constrained("funs") 20 | ->onUpdate('cascade'); 21 | $table->string('ip_address', 45); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('fun_views'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_180331_create_blog_tag_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('blog_id') 19 | ->constrained("blogs") 20 | ->onUpdate('cascade'); 21 | $table->foreignId('tag_id') 22 | ->constrained("tags") 23 | ->onUpdate('cascade') 24 | ; 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('blog_tag'); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /database/migrations/2022_09_04_180338_create_fun_tag_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('fun_id') 19 | ->constrained("funs") 20 | ->onUpdate('cascade'); 21 | $table->foreignId('tag_id') 22 | ->constrained("tags") 23 | ->onUpdate('cascade') 24 | ; 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('fun_tag'); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /database/migrations/2022_09_05_102301_create_subscribers_table.php: -------------------------------------------------------------------------------- 1 | id(); 19 | $table->foreignId('user_id') 20 | ->constrained("users") 21 | ->onUpdate('cascade'); 22 | $table->foreignId('subscriber_id') 23 | ->constrained("users") 24 | ->onUpdate('cascade'); 25 | // $table->boolean('status'); 26 | //1 -> followed 27 | $table->timestamps(); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('subscribers'); 39 | } 40 | }; 41 | -------------------------------------------------------------------------------- /database/migrations/2022_09_29_030355_create_notifications_table.php: -------------------------------------------------------------------------------- 1 | uuid('id')->primary(); 18 | $table->string('type'); 19 | $table->morphs('notifiable'); 20 | $table->text('data'); 21 | $table->timestamp('read_at')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('notifications'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /database/migrations/2022_10_11_075341_create_seo_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | 14 | $table->morphs('model'); 15 | 16 | $table->longText('description')->nullable(); 17 | $table->string('title')->nullable(); 18 | $table->string('image')->nullable(); 19 | $table->string('author')->nullable(); 20 | $table->string('robots')->nullable(); 21 | 22 | $table->timestamps(); 23 | }); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /database/migrations/2022_11_09_114403_add_reputation_field_on_user_table.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('reputation')->default(0)->after('remember_token'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('users', function (Blueprint $table) { 29 | $table->dropColumn('reputation'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/seeders/AdminSeeder.php: -------------------------------------------------------------------------------- 1 | 'admin', 21 | 'first_name' => $faker->firstName(), 22 | 'last_name' => $faker->lastName(), 23 | 'email' => 'admin@gmail.com', 24 | 'username' => 'admin', 25 | // 'image'=>$this->faker->profile(), 26 | 'about_me' => $faker->realText(500), 27 | 'short_bio' => $faker->realText(200), 28 | "portfolio_url" => $faker->url(), 29 | 'twitter_url' => $faker->url(), 30 | 'github_url' => $faker->url(), 31 | 'facebook_url' => $faker->url(), 32 | 'email_verified_at' => now(), 33 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 34 | 'remember_token' => Str::random(10), 35 | ])->assignRole('super-admin','writer','admin'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/seeders/BlogLikeSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 19 | 20 | // \App\Models\User::factory()->create([ 21 | // 'name' => 'Test User', 22 | // 'email' => 'test@example.com', 23 | // ]); 24 | $this->call(PermissionSeeder::class); 25 | $this->call(TagSeeder::class); 26 | $this->call(AdminSeeder::class); 27 | $this->call(UserSeeder::class); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/seeders/FunLikeSeeder.php: -------------------------------------------------------------------------------- 1 | 'writer']); 19 | Role::create(['name'=>'admin']); 20 | Role::create(['name'=>'user']); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/seeders/SubscriberSeeder.php: -------------------------------------------------------------------------------- 1 | 'primary', // blue 20 | 'relaxation' => 'secondary', // grey 21 | 'fun' => 'warning', // yellow 22 | 'nature' => 'success', // green 23 | 'inspiration' => 'light', // white grey 24 | 'friends' => 'info', // turquoise 25 | 'love' => 'danger', // red 26 | 'interest' => 'dark' // black-white 27 | ]; 28 | 29 | foreach ($tags as $key => $value) { 30 | $tag = new Tag( 31 | [ 32 | 'title' => $key, 33 | 'color' => $value, 34 | 'slug'=>SlugService::createSlug(Tag::class, 'slug', $key), 35 | ] 36 | ); 37 | $tag->save(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/build/assets/material-icons-outlined.35dca8a7.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons-outlined.35dca8a7.woff2 -------------------------------------------------------------------------------- /public/build/assets/material-icons-outlined.8e94758c.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons-outlined.8e94758c.woff -------------------------------------------------------------------------------- /public/build/assets/material-icons-round.1c135b15.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons-round.1c135b15.woff -------------------------------------------------------------------------------- /public/build/assets/material-icons-round.c948f126.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons-round.c948f126.woff2 -------------------------------------------------------------------------------- /public/build/assets/material-icons-sharp.d31bfb81.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons-sharp.d31bfb81.woff2 -------------------------------------------------------------------------------- /public/build/assets/material-icons-sharp.fa3888ef.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons-sharp.fa3888ef.woff -------------------------------------------------------------------------------- /public/build/assets/material-icons-two-tone.1e673ba8.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons-two-tone.1e673ba8.woff2 -------------------------------------------------------------------------------- /public/build/assets/material-icons-two-tone.3d34f30a.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons-two-tone.3d34f30a.woff -------------------------------------------------------------------------------- /public/build/assets/material-icons.8265f647.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons.8265f647.woff2 -------------------------------------------------------------------------------- /public/build/assets/material-icons.fd84f88b.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kkumar-gcc/laravel-journal/HEAD/public/build/assets/material-icons.fd84f88b.woff -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images: -------------------------------------------------------------------------------- 1 | /home/krish/blog/storage/app/images -------------------------------------------------------------------------------- /public/js/share.js: -------------------------------------------------------------------------------- 1 | var popupSize = { 2 | width: 780, 3 | height: 550 4 | }; 5 | 6 | $(document).on('click', '.social-button', function (e) { 7 | var verticalPos = Math.floor(($(window).width() - popupSize.width) / 2), 8 | horisontalPos = Math.floor(($(window).height() - popupSize.height) / 2); 9 | 10 | var popup = window.open($(this).prop('href'), 'social', 11 | 'width=' + popupSize.width + ',height=' + popupSize.height + 12 | ',left=' + verticalPos + ',top=' + horisontalPos + 13 | ',location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1'); 14 | 15 | if (popup) { 16 | popup.focus(); 17 | e.preventDefault(); 18 | } 19 | 20 | }); -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | window._ = _; 3 | 4 | /** 5 | * We'll load the axios HTTP library which allows us to easily issue requests 6 | * to our Laravel back-end. This library automatically handles sending the 7 | * CSRF token as a header based on the value of the "XSRF" token cookie. 8 | */ 9 | 10 | import axios from 'axios'; 11 | window.axios = axios; 12 | 13 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 14 | 15 | /** 16 | * Echo exposes an expressive API for subscribing to channels and listening 17 | * for events that are broadcast by Laravel. Echo and event broadcasting 18 | * allows your team to easily build robust real-time web applications. 19 | */ 20 | 21 | // import Echo from 'laravel-echo'; 22 | 23 | // import Pusher from 'pusher-js'; 24 | // window.Pusher = Pusher; 25 | 26 | // window.Echo = new Echo({ 27 | // broadcaster: 'pusher', 28 | // key: import.meta.env.VITE_PUSHER_APP_KEY, 29 | // wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, 30 | // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, 31 | // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, 32 | // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', 33 | // enabledTransports: ['ws', 'wss'], 34 | // }); 35 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/vendor/laravel-share/en/laravel-share-fa5.php: -------------------------------------------------------------------------------- 1 | '
  • ', 5 | 'twitter' => '
  • ', 6 | 'linkedin' => '
  • ', 7 | 'whatsapp' => '
  • ', 8 | 'pinterest' => '
  • ', 9 | 'reddit' => '
  • ', 10 | 'telegram' => '
  • ', 11 | ]; 12 | -------------------------------------------------------------------------------- /resources/views/admin/permissions/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /resources/views/admin/roles/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /resources/views/admin/tags/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /resources/views/admin/users/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /resources/views/auth/confirm-password.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
    10 | {{ __('This is a secure area of the application. Please confirm your password before continuing.') }} 11 |
    12 | 13 | 14 | 15 | 16 |
    17 | @csrf 18 | 19 | 20 |
    21 | 22 | 23 | 27 |
    28 | 29 |
    30 | 31 | {{ __('Confirm') }} 32 | 33 |
    34 |
    35 |
    36 |
    37 | -------------------------------------------------------------------------------- /resources/views/blogs/create.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/views/blogs/draft.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/blogs/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /resources/views/blogs/manage.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 | 5 |
    6 | 7 |
    8 |
    9 | -------------------------------------------------------------------------------- /resources/views/blogs/sare.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/blogs/stats.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 | 5 |
    6 | 7 |
    8 |
    9 | -------------------------------------------------------------------------------- /resources/views/blogs/tagged.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
    7 | 8 |
    9 | 10 |
    11 |
    12 |

    {{$searchTag->description}}

    13 |
    14 |
    15 | 16 |
    17 | 18 |
    19 | -------------------------------------------------------------------------------- /resources/views/blogs/update.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/views/comments/show.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{-- --}} 6 |
    7 | 8 | 9 |
    10 |
    11 | -------------------------------------------------------------------------------- /resources/views/components/auth-card.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | {{ $logo }} 4 |
    5 | 6 |
    7 | {{ $slot }} 8 |
    9 |
    10 | -------------------------------------------------------------------------------- /resources/views/components/auth-session-status.blade.php: -------------------------------------------------------------------------------- 1 | @props(['status']) 2 | 3 | @if ($status) 4 |
    merge(['class' => 'font-medium text-sm text-green-600']) }}> 5 | {{ $status }} 6 |
    7 | @endif 8 | -------------------------------------------------------------------------------- /resources/views/components/auth-validation-errors.blade.php: -------------------------------------------------------------------------------- 1 | @props(['errors']) 2 | 3 | @if ($errors->any()) 4 |
    5 |
    6 | {{ __('Whoops! Something went wrong.') }} 7 |
    8 | 9 |
      10 | @foreach ($errors->all() as $error) 11 |
    • {{ $error }}
    • 12 | @endforeach 13 |
    14 |
    15 | @endif 16 | -------------------------------------------------------------------------------- /resources/views/components/button.blade.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /resources/views/components/buttons/danger.blade.php: -------------------------------------------------------------------------------- 1 | @props(['fullWidth' => false, 'type' => 'button', 'default']) 2 | @php 3 | $classes = $default ?? true ? 'w-full text-white text-sm capatalize py-2 px-4 leading-6 cursor-pointer inline-flex flex-row justify-center items-center no-underline rounded-md font-semibold cursor-pointer transition duration-200 ease-in-out shadow-md shadow-rose-100 bg-rose-500' : 'capatalize text-sm py-2 px-4 leading-6 cursor-pointer inline-flex flex-row justify-center items-center no-underline rounded-md font-semibold cursor-pointer transition duration-200 ease-in-out'; 4 | @endphp 5 | 6 | 7 | @if ($attributes->has('href')) 8 | merge(['class' => $classes]) }}> 9 | {{ $slot }} 10 | 11 | @else 12 | 15 | @endif 16 | 17 | -------------------------------------------------------------------------------- /resources/views/components/buttons/primary.blade.php: -------------------------------------------------------------------------------- 1 | @props(['fullWidth' => false, 'type' => 'button']) 2 | 3 | @if ($attributes->has('href')) 4 | merge([ 6 | 'class' => 7 | ($fullWidth ? 'w-full ' : '') . 8 | 'bg-skin-base capatalize py-2 px-4 leading-6 cursor-pointer border inline-flex flex-row justify-center items-center no-underline rounded-md font-semibold cursor-pointer transition duration-200 ease-in-out shadow-sm shadow-gray-100', 9 | ]) }}> 10 | {{ $slot }} 11 | 12 | @else 13 | 21 | @endif 22 | 23 | -------------------------------------------------------------------------------- /resources/views/components/buttons/secondary.blade.php: -------------------------------------------------------------------------------- 1 | @props(['fullWidth' => false, 'type' => 'button', 'default']) 2 | 3 | @php 4 | $classes = $default ?? true ? 'w-full text-skin-base bg-skin-500 text-base capatalize py-2 px-4 leading-6 cursor-pointer inline-flex flex-row justify-center items-center no-underline rounded-md font-medium transition duration-200 ease-in-out shadow-md ' : 'capatalize text-base py-2 px-4 leading-6 cursor-pointer inline-flex flex-row justify-center items-center no-underline rounded-md shadow-md font-medium transition duration-200 ease-in-out'; 5 | @endphp 6 | 7 | @if ($attributes->has('href')) 8 | merge(['class' => $classes]) }}> 9 | {{ $slot }} 10 | 11 | @else 12 | 15 | @endif 16 | 17 | -------------------------------------------------------------------------------- /resources/views/components/buttons/simple.blade.php: -------------------------------------------------------------------------------- 1 | @props(['default'=>true]) 2 | 10 | -------------------------------------------------------------------------------- /resources/views/components/cards/primary-card.blade.php: -------------------------------------------------------------------------------- 1 | @props(['default']) 2 | @php 3 | $classes = $default ?? false 4 | ? 'p-1 px-2 md:p-2.5 border border-gray-200 relative mt-8 first:mt-0 w-full text-base text-left rounded-lg font-normal shadow-sm hover:shadow-md' 5 | : 'border border-gray-200 relative mt-8 first:mt-0 w-full text-base text-left rounded-lg font-normal shadow-sm hover:shadow-md'; 6 | @endphp 7 | 8 |
    merge(['class' => $classes]) }}> 9 | {{ $slot }} 10 |
    11 | -------------------------------------------------------------------------------- /resources/views/components/collapses/primary.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | {{-- 3 | 4 |
    5 |

    Content Here

    6 | 7 |
    8 | 9 | 10 |

    nested content here

    11 |
    12 |
    --}} 13 |
    14 | {{ $trigger }} 15 |
    16 | 17 | 23 |
    24 | -------------------------------------------------------------------------------- /resources/views/components/demo.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    -------------------------------------------------------------------------------- /resources/views/components/dropdown-link.blade.php: -------------------------------------------------------------------------------- 1 | merge(['class' => 'block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 cursor-pointer transition duration-150 ease-in-out']) }}>{{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/components/form/input-field.blade.php: -------------------------------------------------------------------------------- 1 | @props(['disabled' => false]) 2 | 3 | merge(['class' => 'border border-gray-300 text-gray-600 text-base font-semibold focus:shadow-md focus:ring-4 focus:ring-skin-500/20 focus:border-skin-600 block w-full p-3.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-4 dark:focus:border-skin-500']) !!} /> 4 | -------------------------------------------------------------------------------- /resources/views/components/forms/tinymce-editor.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /resources/views/components/input.blade.php: -------------------------------------------------------------------------------- 1 | @props(['disabled' => false]) 2 | 3 | merge(['class' => 'rounded-md shadow-sm border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}> 4 | -------------------------------------------------------------------------------- /resources/views/components/label.blade.php: -------------------------------------------------------------------------------- 1 | @props(['value']) 2 | 3 | 6 | -------------------------------------------------------------------------------- /resources/views/components/modals/simple.blade.php: -------------------------------------------------------------------------------- 1 | @props(['default' => 'false']) 2 |
    3 | {{ $title }} 4 | 22 |
    23 | -------------------------------------------------------------------------------- /resources/views/components/nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'inline-flex items-center px-1 pt-1 border-b-2 border-skin-600 text-base font-medium leading-5 text-gray-900 focus:outline-none focus:border-skin-700 transition duration-150 ease-in-out' 6 | : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-base font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out'; 7 | @endphp 8 | 9 | merge(['class' => $classes]) }}> 10 | {{ $slot }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/components/responsive-nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'block pl-3 pr-4 py-2 border-l-4 border-skin-600 text-base font-semibold text-skin-700 bg-skin-50 focus:outline-none focus:text-skin-800 focus:bg-skin-100 focus:border-skin-700 transition duration-150 ease-in-out' 6 | : 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-semibold text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out'; 7 | @endphp 8 | 9 | merge(['class' => $classes]) }}> 10 | {{ $slot }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/components/scripts/milkdown.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /resources/views/components/side-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white bg-gray-100 dark:bg-gray-700 hover:bg-gray-100 dark:hover:bg-gray-700' 6 | : 'flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700'; 7 | @endphp 8 | 9 | merge(['class' => $classes]) }}> 10 | {{ $slot }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/components/sidebar.blade.php: -------------------------------------------------------------------------------- 1 | @props(['topBlogs' => false, 'topUsers' => true, 'topTags' => true]) 2 |
    3 | {{ $slot }} 4 | @if ($topBlogs) 5 | 6 | @endif 7 | @if ($topUsers) 8 | 9 | @endif 10 | @if ($topTags) 11 | 12 | @endif 13 |
    14 | -------------------------------------------------------------------------------- /resources/views/components/tag.blade.php: -------------------------------------------------------------------------------- 1 | @props(['tag']) 2 | 3 | merge(['class' => 'text-[10px] no-underline tag-popover '.$tag->color]) }} {{ $attributes['id']}}> 4 | 6 | {{ $tag->title }} 7 | 8 | 9 | -------------------------------------------------------------------------------- /resources/views/dashboard.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    4 | {{ __('Dashboard') }} 5 |

    6 |
    7 | 8 |
    9 |
    10 |
    11 |
    12 | You're logged in! 13 |
    14 |
    15 |
    16 |
    17 |
    18 | -------------------------------------------------------------------------------- /resources/views/errors/401.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Unauthorized')) 4 | @section('code', '401') 5 | @section('message', __('Unauthorized')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/403.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Forbidden')) 4 | @section('code', '403') 5 | @section('message', __($exception->getMessage() ?: 'Forbidden')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/404.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Not Found')) 4 | @section('code', '404') 5 | @section('message', __('Not Found')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/419.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Page Expired')) 4 | @section('code', '419') 5 | @section('message', __('Page Expired')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/429.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Too Many Requests')) 4 | @section('code', '429') 5 | @section('message', __('Too Many Requests')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/500.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Server Error')) 4 | @section('code', '500') 5 | @section('message', __('Server Error')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Service Unavailable')) 4 | @section('code', '503') 5 | @section('message', __('Service Unavailable')) 6 | -------------------------------------------------------------------------------- /resources/views/layouts/guest.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {!! seo($page ?? null) !!} 8 | 9 | 10 | 11 | 12 | @vite(['resources/css/app.css', 'resources/js/app.js']) 13 | 14 | 15 |
    16 | {{ $slot }} 17 |
    18 | 19 | 20 | -------------------------------------------------------------------------------- /resources/views/livewire/admin/role/create.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | {{-- Nothing in the world is as soft and yielding as water. --}} 3 |
    4 | -------------------------------------------------------------------------------- /resources/views/livewire/admin/user/edit.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | {{-- Stop trying to control. --}} 3 |
    4 | -------------------------------------------------------------------------------- /resources/views/livewire/admin/user/permissions.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | {{-- Because she competes with no one, no one can compete with her. --}} 3 |
    4 | -------------------------------------------------------------------------------- /resources/views/livewire/blogs/show.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | {{-- The Master doesn't talk, he acts. --}} 3 |
    4 | -------------------------------------------------------------------------------- /resources/views/livewire/edit-comment.blade.php: -------------------------------------------------------------------------------- 1 | 2 | {{--
    3 | @csrf 4 |
    5 |
    6 | 7 |
    8 |
    9 | {{ __('Edit') }} 10 | 11 | {{ __('Cancel') }} 12 | 13 | 22 | 23 |
    --}} 24 |
    25 | hi there public 26 |
    27 | -------------------------------------------------------------------------------- /resources/views/livewire/notification-indicator.blade.php: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /resources/views/livewire/top-blogs.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | {{-- Be like water. --}} 3 |
    4 | -------------------------------------------------------------------------------- /resources/views/livewire/top-tags.blade.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    Top Tags

    4 |
    5 |
      6 | @foreach ($topTags as $topTag) 7 |
    • 9 | 10 | 11 | 12 | ×  13 | {{ $topTag->blogs_count }} 14 | 15 |
    • 16 | @endforeach 17 |
    18 |
    19 | -------------------------------------------------------------------------------- /resources/views/livewire/top-users.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | @if ($topUsers->count() > 3) 3 |
    4 |
    5 |

    Top Users

    6 |
    7 | 22 |
    23 | @endif 24 |
    25 | -------------------------------------------------------------------------------- /resources/views/notifications/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/views/profile/private/_blog.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | @if ($blogs->count() > 0) 3 | @foreach ($blogs as $blog) 4 | 5 | @endforeach 6 | {!! $blogs->withQueryString()->links('pagination::tailwind') !!} 7 | @else 8 |
    10 | You haven't published any blog. 11 |
    12 | @endif 13 |
    14 | -------------------------------------------------------------------------------- /resources/views/profile/private/_bookmark.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | @if ($bookmarks->count() > 0) 3 |
    4 | @foreach ($bookmarks as $bookmark) 5 | 6 | @endforeach 7 | {!! $bookmarks->withQueryString()->links('pagination::tailwind') !!} 8 |
    9 | @else 10 |
    12 | You haven't bookmarked any blog. 13 |
    14 | @endif 15 | 16 |
    17 | -------------------------------------------------------------------------------- /resources/views/profile/private/_draft.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | @if ($drafts->count() > 0) 3 |
    4 | @foreach ($drafts as $draft) 5 | 6 | @endforeach 7 | {!! $drafts->withQueryString()->links('pagination::tailwind') !!} 8 |
    9 | @else 10 |
    11 | You don't have any drafted blog. 12 |
    13 | @endif 14 |
    15 | -------------------------------------------------------------------------------- /resources/views/profile/private/_following.blade.php: -------------------------------------------------------------------------------- 1 | @if (count($followings) > 0) 2 | @foreach ($followings as $following) 3 | 4 | @endforeach 5 | 6 | {!! $followings->withQueryString()->onEachSide(3)->links('pagination::tailwind') !!} 7 | @else 8 | 9 |
    10 | You don't follow anyone. 11 |
    12 |
    13 | @endif 14 | -------------------------------------------------------------------------------- /resources/views/profile/private/_podcast.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/profile/private/_profile.blade.php: -------------------------------------------------------------------------------- 1 | {{-- --}} 2 | -------------------------------------------------------------------------------- /resources/views/profile/private/_tag.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/profile/public/_about.blade.php: -------------------------------------------------------------------------------- 1 |
    3 |
    4 |
    5 |
    About Me
    6 |
    7 | @auth 8 | 13 | @endauth 14 |
    15 |
    17 | @if ($user->about_me) 18 | 19 | {!! $user->aboutMe() !!} 20 | 21 | @else 22 | {{ $user->username }} hasn't updated "about me". 23 | @endif 24 |
    25 |
    26 | -------------------------------------------------------------------------------- /resources/views/profile/public/_bookmark.blade.php: -------------------------------------------------------------------------------- 1 | @if ($bookmarks->isNotEmpty()) 2 | @foreach ($bookmarks as $bookmark) 3 | 4 | @endforeach 5 | {!! $bookmarks->withQueryString()->links('pagination::tailwind') !!} 6 | @else 7 |
    9 | {{ $user->username }} has no bookmarked blogs. 10 |
    11 | @endif 12 | 13 | -------------------------------------------------------------------------------- /resources/views/search/index.blade.php: -------------------------------------------------------------------------------- 1 |

    hello

    2 | -------------------------------------------------------------------------------- /resources/views/users/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/livewire-tailwind.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 27 | @endif 28 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-bootstrap-5.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 29 | @endif 30 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 19 | @endif 20 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/Auth/AuthenticationTest.php: -------------------------------------------------------------------------------- 1 | get('/login'); 17 | 18 | $response->assertStatus(200); 19 | } 20 | 21 | public function test_users_can_authenticate_using_the_login_screen() 22 | { 23 | $user = User::factory()->create(); 24 | 25 | $response = $this->post('/login', [ 26 | 'email' => $user->email, 27 | 'password' => 'password', 28 | ]); 29 | 30 | $this->assertAuthenticated(); 31 | $response->assertRedirect(RouteServiceProvider::HOME); 32 | } 33 | 34 | public function test_users_can_not_authenticate_with_invalid_password() 35 | { 36 | $user = User::factory()->create(); 37 | 38 | $this->post('/login', [ 39 | 'email' => $user->email, 40 | 'password' => 'wrong-password', 41 | ]); 42 | 43 | $this->assertGuest(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tests/Feature/Auth/PasswordConfirmationTest.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | $response = $this->actingAs($user)->get('/confirm-password'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | 22 | public function test_password_can_be_confirmed() 23 | { 24 | $user = User::factory()->create(); 25 | 26 | $response = $this->actingAs($user)->post('/confirm-password', [ 27 | 'password' => 'password', 28 | ]); 29 | 30 | $response->assertRedirect(); 31 | $response->assertSessionHasNoErrors(); 32 | } 33 | 34 | public function test_password_is_not_confirmed_with_invalid_password() 35 | { 36 | $user = User::factory()->create(); 37 | 38 | $response = $this->actingAs($user)->post('/confirm-password', [ 39 | 'password' => 'wrong-password', 40 | ]); 41 | 42 | $response->assertSessionHasErrors(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /tests/Feature/Auth/RegistrationTest.php: -------------------------------------------------------------------------------- 1 | get('/register'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | 20 | public function test_new_users_can_register() 21 | { 22 | $response = $this->post('/register', [ 23 | 'name' => 'Test User', 24 | 'username'=>'Test Username', 25 | 'email' => 'test@example.com', 26 | 'password' => 'password', 27 | 'password_confirmation' => 'password', 28 | ]); 29 | 30 | $this->assertAuthenticated(); 31 | $response->assertRedirect(RouteServiceProvider::HOME); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | 4 | import livewire from '@defstudio/vite-livewire-plugin'; // <-- import 5 | export default defineConfig({ 6 | plugins: [ 7 | laravel({ 8 | input: [ 9 | 'resources/css/app.css', 10 | 'resources/js/app.js', 11 | ], 12 | refresh: true, 13 | }), 14 | livewire({ // <-- add livewire plugin 15 | refresh: ['resources/css/app.css'], // <-- will refresh css (tailwind ) as well 16 | }), 17 | ], 18 | }); 19 | --------------------------------------------------------------------------------