├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── app ├── Actions │ ├── Fortify │ │ ├── CreateNewUser.php │ │ ├── PasswordValidationRules.php │ │ ├── ResetUserPassword.php │ │ ├── UpdateUserPassword.php │ │ └── UpdateUserProfileInformation.php │ └── Jetstream │ │ └── DeleteUser.php ├── Console │ ├── Commands │ │ └── TweetAboutCourseReleaseCommand.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Controller.php │ │ ├── PageCourseDetailsController.php │ │ ├── PageDashboardController.php │ │ ├── PageHomeController.php │ │ └── PageVideosController.php │ ├── Kernel.php │ ├── Livewire │ │ └── VideoPlayer.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── ValidateSignature.php │ │ └── VerifyCsrfToken.php ├── Jobs │ └── HandlePaddlePurchaseJob.php ├── Mail │ └── NewPurchaseMail.php ├── Models │ ├── Course.php │ ├── PurchasedCourse.php │ ├── User.php │ ├── Video.php │ └── WatchedVideos.php ├── PaddleSignatureValidator.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ ├── FortifyServiceProvider.php │ ├── JetstreamServiceProvider.php │ ├── RouteServiceProvider.php │ └── TwitterServiceProvider.php ├── Services │ └── Twitter │ │ ├── NullTwitterClient.php │ │ ├── TwitterClient.php │ │ ├── TwitterClientInterface.php │ │ └── TwitterFacade.php └── View │ └── Components │ ├── AppLayout.php │ └── GuestLayout.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── fortify.php ├── hashing.php ├── jetstream.php ├── logging.php ├── mail.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php ├── view.php └── webhook-client.php ├── database ├── .gitignore ├── factories │ ├── CourseFactory.php │ ├── UserFactory.php │ └── VideoFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2014_10_12_200000_add_two_factor_columns_to_users_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2022_08_24_142241_create_courses_table.php │ ├── 2022_09_01_102915_create_videos_table.php │ ├── 2022_09_01_192246_create_sessions_table.php │ ├── 2022_09_01_213333_create_purchased_courses_table.php │ ├── 2022_09_05_090542_create_watched_videos_table.php │ └── 2022_09_06_092146_create_webhook_calls_table.php └── seeders │ ├── AddGivenCoursesSeeder.php │ ├── AddGivenVideosSeeder.php │ ├── DatabaseSeeder.php │ └── TestUserSeeder.php ├── lang └── en │ ├── auth.php │ ├── pagination.php │ ├── passwords.php │ └── validation.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── postcss.config.js ├── public ├── .htaccess ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── apple-touch-icon.png ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── images │ ├── advanced_laravel.png │ ├── coding_illustration.svg │ ├── laravel_for_beginners.png │ ├── social.png │ ├── tdd_the_laravel_way.png │ └── tv_logo.png ├── index.php └── robots.txt ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── markdown │ ├── policy.md │ └── terms.md └── views │ ├── api │ ├── api-token-manager.blade.php │ └── index.blade.php │ ├── auth │ ├── confirm-password.blade.php │ ├── forgot-password.blade.php │ ├── login.blade.php │ ├── register.blade.php │ ├── reset-password.blade.php │ ├── two-factor-challenge.blade.php │ └── verify-email.blade.php │ ├── emails │ └── paddle-purchase.blade.php │ ├── layouts │ ├── app.blade.php │ └── guest.blade.php │ ├── livewire │ └── video-player.blade.php │ ├── navigation-menu.blade.php │ ├── pages │ ├── course-details.blade.php │ ├── dashboard.blade.php │ ├── home.blade.php │ └── videos.blade.php │ ├── partials │ ├── favicon.blade.php │ ├── footer.blade.php │ ├── home-course-item.blade.php │ ├── purchase-course-list-item.blade.php │ └── svg │ │ └── play.blade.php │ ├── policy.blade.php │ ├── profile │ ├── delete-user-form.blade.php │ ├── logout-other-browser-sessions-form.blade.php │ ├── show.blade.php │ ├── two-factor-authentication-form.blade.php │ ├── update-password-form.blade.php │ └── update-profile-information-form.blade.php │ └── terms.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── CreatesApplication.php ├── Feature │ ├── ArchTest.php │ ├── DatabaseSeederTest.php │ ├── Fakes │ │ └── TwitterFake.php │ ├── HandlePaddlePurchaseJobTest.php │ ├── Jetstream │ │ ├── AuthenticationTest.php │ │ ├── BrowserSessionsTest.php │ │ ├── DeleteAccountTest.php │ │ ├── PasswordConfirmationTest.php │ │ ├── PasswordResetTest.php │ │ ├── ProfileInformationTest.php │ │ ├── TwoFactorAuthenticationSettingsTest.php │ │ └── UpdatePasswordTest.php │ ├── Livewire │ │ └── VideoPlayerTest.php │ ├── Models │ │ ├── CourseTest.php │ │ ├── UserTest.php │ │ └── VideoTest.php │ ├── NewPurchaseMailTest.php │ ├── Pages │ │ ├── PageCourseDetailsTest.php │ │ ├── PageDashboardTest.php │ │ ├── PageHomeTest.php │ │ ├── PageVideosTest.php │ │ └── PagesResponseTest.php │ ├── TweetAboutCourseReleaseCommandTest.php │ └── WebhookPaddlePurchaseTest.php ├── Pest.php ├── TestCase.php └── Unit │ ├── ExampleTest.php │ ├── NullTwitterClientTest.php │ └── TwitterClientTest.php ├── todos.md └── 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=pest_driven_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=database 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 | PADDLE_VENDOR_ID= 41 | PADDLE_PUBLIC_KEY= 42 | 43 | TWITTER_CONSUMER_KEY= 44 | TWITTER_CONSUMER_SECRET= 45 | TWITTER_ACCESS_TOKEN= 46 | TWITTER_ACCESS_TOKEN_SECRET= 47 | -------------------------------------------------------------------------------- /.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/build 3 | /public/hot 4 | /public/storage 5 | /storage/*.key 6 | /vendor 7 | .env 8 | .env.backup 9 | .phpunit.result.cache 10 | Homestead.json 11 | Homestead.yaml 12 | auth.json 13 | npm-debug.log 14 | yarn-error.log 15 | /.idea 16 | /.vscode 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | 9 | 10 | ## About Laravel 11 | 12 | Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: 13 | 14 | - [Simple, fast routing engine](https://laravel.com/docs/routing). 15 | - [Powerful dependency injection container](https://laravel.com/docs/container). 16 | - Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. 17 | - Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). 18 | - Database agnostic [schema migrations](https://laravel.com/docs/migrations). 19 | - [Robust background job processing](https://laravel.com/docs/queues). 20 | - [Real-time event broadcasting](https://laravel.com/docs/broadcasting). 21 | 22 | Laravel is accessible, powerful, and provides tools required for large, robust applications. 23 | 24 | ## Learning Laravel 25 | 26 | Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. 27 | 28 | If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. 29 | 30 | ## Laravel Sponsors 31 | 32 | We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). 33 | 34 | ### Premium Partners 35 | 36 | - **[Vehikl](https://vehikl.com/)** 37 | - **[Tighten Co.](https://tighten.co)** 38 | - **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** 39 | - **[64 Robots](https://64robots.com)** 40 | - **[Cubet Techno Labs](https://cubettech.com)** 41 | - **[Cyber-Duck](https://cyber-duck.co.uk)** 42 | - **[Many](https://www.many.co.uk)** 43 | - **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** 44 | - **[DevSquad](https://devsquad.com)** 45 | - **[Curotec](https://www.curotec.com/services/technologies/laravel/)** 46 | - **[OP.GG](https://op.gg)** 47 | - **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** 48 | - **[Lendio](https://lendio.com)** 49 | 50 | ## Contributing 51 | 52 | Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). 53 | 54 | ## Code of Conduct 55 | 56 | In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). 57 | 58 | ## Security Vulnerabilities 59 | 60 | If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. 61 | 62 | ## License 63 | 64 | The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). 65 | -------------------------------------------------------------------------------- /app/Actions/Fortify/CreateNewUser.php: -------------------------------------------------------------------------------- 1 | ['required', 'string', 'max:255'], 24 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 25 | 'password' => $this->passwordRules(), 26 | 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '', 27 | ])->validate(); 28 | 29 | return User::create([ 30 | 'name' => $input['name'], 31 | 'email' => $input['email'], 32 | 'password' => Hash::make($input['password']), 33 | ]); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Actions/Fortify/PasswordValidationRules.php: -------------------------------------------------------------------------------- 1 | $this->passwordRules(), 23 | ])->validate(); 24 | 25 | $user->forceFill([ 26 | 'password' => Hash::make($input['password']), 27 | ])->save(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Actions/Fortify/UpdateUserPassword.php: -------------------------------------------------------------------------------- 1 | ['required', 'string'], 23 | 'password' => $this->passwordRules(), 24 | ])->after(function ($validator) use ($user, $input) { 25 | if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $user->password)) { 26 | $validator->errors()->add('current_password', __('The provided password does not match your current password.')); 27 | } 28 | })->validateWithBag('updatePassword'); 29 | 30 | $user->forceFill([ 31 | 'password' => Hash::make($input['password']), 32 | ])->save(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Actions/Fortify/UpdateUserProfileInformation.php: -------------------------------------------------------------------------------- 1 | ['required', 'string', 'max:255'], 22 | 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)], 23 | 'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'], 24 | ])->validateWithBag('updateProfileInformation'); 25 | 26 | if (isset($input['photo'])) { 27 | $user->updateProfilePhoto($input['photo']); 28 | } 29 | 30 | if ($input['email'] !== $user->email && 31 | $user instanceof MustVerifyEmail) { 32 | $this->updateVerifiedUser($user, $input); 33 | } else { 34 | $user->forceFill([ 35 | 'name' => $input['name'], 36 | 'email' => $input['email'], 37 | ])->save(); 38 | } 39 | } 40 | 41 | /** 42 | * Update the given verified user's profile information. 43 | * 44 | * @param mixed $user 45 | * @return void 46 | */ 47 | protected function updateVerifiedUser($user, array $input) 48 | { 49 | $user->forceFill([ 50 | 'name' => $input['name'], 51 | 'email' => $input['email'], 52 | 'email_verified_at' => null, 53 | ])->save(); 54 | 55 | $user->sendEmailVerificationNotification(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/Actions/Jetstream/DeleteUser.php: -------------------------------------------------------------------------------- 1 | deleteProfilePhoto(); 18 | $user->tokens->each->delete(); 19 | $user->delete(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Console/Commands/TweetAboutCourseReleaseCommand.php: -------------------------------------------------------------------------------- 1 | argument('courseId')); 18 | 19 | Twitter::tweet("I just released $course->title 🎉 Check it out on ".route('page.course-details', $course)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 18 | } 19 | 20 | /** 21 | * Register the commands for the application. 22 | * 23 | * @return void 24 | */ 25 | protected function commands() 26 | { 27 | $this->load(__DIR__.'/Commands'); 28 | 29 | require base_path('routes/console.php'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.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{{ $video->description }}
24 | 25 |{{ $courseVideo->getReadableDuration() }}
47 |{{ $course->title }} ({{ $course->videos_count }} videos)
28 |{{ $course->description }}
29 | Buy 30 | Now! 31 |On the dashboard you can find your purchased courses.
8 |LaravelCasts is the 30 | leading learning platform for Laravel developers.
31 |All of our courses will teach you one 50 | specific aspect of programming. Go step by step and never stop learning.
51 |12 | Video course 13 |
14 | 15 |{{ $course->title }}e
16 |{{ $course->description }}
17 | 18 |