├── .gitignore ├── Laravel Inertia React series └── laravel_inertia_react │ ├── .editorconfig │ ├── .env.example │ ├── .gitattributes │ ├── .gitignore │ ├── README.md │ ├── app │ ├── Http │ │ ├── Controllers │ │ │ ├── Controller.php │ │ │ └── PostController.php │ │ └── Middleware │ │ │ └── HandleInertiaRequests.php │ ├── Models │ │ ├── Post.php │ │ └── User.php │ ├── Policies │ │ └── PostPolicy.php │ └── Providers │ │ └── AppServiceProvider.php │ ├── artisan │ ├── bootstrap │ ├── app.php │ ├── cache │ │ └── .gitignore │ └── providers.php │ ├── composer.json │ ├── composer.lock │ ├── config │ ├── app.php │ ├── auth.php │ ├── cache.php │ ├── database.php │ ├── filesystems.php │ ├── logging.php │ ├── mail.php │ ├── queue.php │ ├── services.php │ └── session.php │ ├── database │ ├── .gitignore │ ├── factories │ │ ├── PostFactory.php │ │ └── UserFactory.php │ ├── migrations │ │ ├── 0001_01_01_000000_create_users_table.php │ │ ├── 0001_01_01_000001_create_cache_table.php │ │ ├── 0001_01_01_000002_create_jobs_table.php │ │ └── 2024_05_26_100246_create_posts_table.php │ └── seeders │ │ └── DatabaseSeeder.php │ ├── package-lock.json │ ├── package.json │ ├── phpunit.xml │ ├── postcss.config.js │ ├── public │ ├── .htaccess │ ├── favicon.ico │ ├── index.php │ └── robots.txt │ ├── resources │ ├── css │ │ └── app.css │ ├── js │ │ ├── Layouts │ │ │ └── Layout.jsx │ │ ├── Pages │ │ │ ├── Create.jsx │ │ │ ├── Edit.jsx │ │ │ ├── Home.jsx │ │ │ └── Show.jsx │ │ ├── app.jsx │ │ └── bootstrap.js │ └── views │ │ └── app.blade.php │ ├── routes │ ├── 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 │ ├── Feature │ │ └── ExampleTest.php │ ├── Pest.php │ ├── TestCase.php │ └── Unit │ │ └── ExampleTest.php │ └── vite.config.js ├── Laravel Sanctum API series ├── laravel-api-app │ ├── .editorconfig │ ├── .env.example │ ├── .gitattributes │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── Http │ │ │ └── Controllers │ │ │ │ ├── AuthController.php │ │ │ │ ├── Controller.php │ │ │ │ └── PostController.php │ │ ├── Models │ │ │ ├── Post.php │ │ │ └── User.php │ │ ├── Policies │ │ │ └── PostPolicy.php │ │ └── Providers │ │ │ └── AppServiceProvider.php │ ├── artisan │ ├── bootstrap │ │ ├── app.php │ │ ├── cache │ │ │ └── .gitignore │ │ └── providers.php │ ├── composer.json │ ├── composer.lock │ ├── config │ │ ├── app.php │ │ ├── auth.php │ │ ├── cache.php │ │ ├── database.php │ │ ├── filesystems.php │ │ ├── logging.php │ │ ├── mail.php │ │ ├── queue.php │ │ ├── sanctum.php │ │ ├── services.php │ │ └── session.php │ ├── database │ │ ├── .gitignore │ │ ├── factories │ │ │ ├── PostFactory.php │ │ │ └── UserFactory.php │ │ ├── migrations │ │ │ ├── 0001_01_01_000000_create_users_table.php │ │ │ ├── 0001_01_01_000001_create_cache_table.php │ │ │ ├── 0001_01_01_000002_create_jobs_table.php │ │ │ ├── 2024_06_18_042605_create_personal_access_tokens_table.php │ │ │ └── 2024_06_18_043822_create_posts_table.php │ │ └── seeders │ │ │ ├── DatabaseSeeder.php │ │ │ └── PostSeeder.php │ ├── package.json │ ├── phpunit.xml │ ├── public │ │ ├── .htaccess │ │ ├── favicon.ico │ │ ├── index.php │ │ └── robots.txt │ ├── resources │ │ ├── css │ │ │ └── app.css │ │ ├── js │ │ │ ├── app.js │ │ │ └── bootstrap.js │ │ └── views │ │ │ └── welcome.blade.php │ ├── routes │ │ ├── api.php │ │ ├── console.php │ │ └── web.php │ ├── storage │ │ ├── app │ │ │ ├── .gitignore │ │ │ └── public │ │ │ │ └── .gitignore │ │ ├── framework │ │ │ ├── .gitignore │ │ │ ├── cache │ │ │ │ ├── .gitignore │ │ │ │ └── data │ │ │ │ │ └── .gitignore │ │ │ ├── sessions │ │ │ │ └── .gitignore │ │ │ ├── testing │ │ │ │ └── .gitignore │ │ │ └── views │ │ │ │ └── .gitignore │ │ └── logs │ │ │ └── .gitignore │ ├── tests │ │ ├── Feature │ │ │ └── ExampleTest.php │ │ ├── TestCase.php │ │ └── Unit │ │ │ └── ExampleTest.php │ └── vite.config.js ├── laravel-api-react-app │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ └── vite.svg │ ├── src │ │ ├── App.css │ │ ├── App.jsx │ │ ├── Context │ │ │ └── AppContext.jsx │ │ ├── Pages │ │ │ ├── Auth │ │ │ │ ├── Login.jsx │ │ │ │ └── Register.jsx │ │ │ ├── Home.jsx │ │ │ ├── Layout.jsx │ │ │ └── Posts │ │ │ │ ├── Create.jsx │ │ │ │ ├── Show.jsx │ │ │ │ └── Update.jsx │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js └── laravel-api-vue-app │ ├── .gitignore │ ├── .vscode │ └── extensions.json │ ├── README.md │ ├── index.html │ ├── jsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── src │ ├── App.vue │ ├── assets │ │ └── main.css │ ├── main.js │ ├── router │ │ └── index.js │ ├── stores │ │ ├── auth.js │ │ └── posts.js │ └── views │ │ ├── Auth │ │ ├── LoginView.vue │ │ └── RegisterView.vue │ │ ├── HomeView.vue │ │ └── Posts │ │ ├── CreateView.vue │ │ ├── ShowView.vue │ │ └── UpdateView.vue │ ├── tailwind.config.js │ └── vite.config.js ├── MERN stack ├── React_basics │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── db.json │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ └── vite.svg │ ├── src │ │ ├── App.jsx │ │ ├── assets │ │ │ └── index.css │ │ ├── components │ │ │ └── PostItem.jsx │ │ ├── layouts │ │ │ └── Layout.jsx │ │ ├── main.jsx │ │ └── pages │ │ │ ├── Home.jsx │ │ │ ├── NoPage.jsx │ │ │ └── PostCreate.jsx │ ├── tailwind.config.js │ └── vite.config.js └── mern_2024 │ ├── backend │ ├── .env │ ├── README.md │ ├── controllers │ │ ├── postsController.js │ │ └── usersController.js │ ├── middlewares │ │ └── auth.js │ ├── models │ │ ├── PostModel.js │ │ └── UserModel.js │ ├── package-lock.json │ ├── package.json │ ├── routes │ │ ├── postsRoutes.js │ │ └── usersRoutes.js │ └── server.js │ └── frontend │ ├── README.md │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src │ ├── App.jsx │ ├── Components │ │ ├── Alert.jsx │ │ ├── Post.jsx │ │ └── Success.jsx │ ├── Routes │ │ ├── AuthRoutes.jsx │ │ └── GuestRoutes.jsx │ ├── assets │ │ └── app.css │ ├── contexts │ │ ├── PostContext.jsx │ │ └── UserContext.jsx │ ├── controllers │ │ ├── postsController.js │ │ └── usersController.js │ ├── main.jsx │ └── pages │ │ ├── Layout.jsx │ │ ├── posts │ │ ├── Create.jsx │ │ ├── Home.jsx │ │ └── Update.jsx │ │ └── users │ │ ├── Dashboard.jsx │ │ ├── Login.jsx │ │ └── Register.jsx │ ├── tailwind.config.js │ └── vite.config.js ├── README.md ├── React Hooks ├── useContext │ ├── README.md │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── App.jsx │ │ ├── Form.jsx │ │ ├── MyContext.js │ │ ├── Posts.jsx │ │ └── main.jsx │ └── vite.config.js └── useReducer │ ├── README.md │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── App.jsx │ ├── FormEx.jsx │ ├── ObjectEx.jsx │ ├── SimpleEx.jsx │ ├── main.jsx │ └── postsReducer.js │ └── vite.config.js ├── Tips & tricks videos ├── JS_components_no_framework │ ├── components │ │ ├── card.js │ │ ├── footer.js │ │ └── header.js │ ├── index.html │ └── main.js ├── JS_image_switcher │ ├── index.html │ ├── main.css │ └── main.js ├── cool_input_field │ ├── index.html │ └── main.css ├── full_website │ ├── README.md │ ├── css │ │ ├── build.css │ │ ├── input.css │ │ └── output.css │ ├── index.html │ ├── js │ │ ├── navigation.js │ │ ├── themes.js │ │ └── yt.js │ ├── logo.webp │ ├── package-lock.json │ ├── package.json │ └── tailwind.config.js ├── mobile_menu │ ├── index.html │ ├── main.css │ └── script.js ├── responsive_image_flex │ ├── images │ │ ├── img_1.webp │ │ ├── img_2.webp │ │ ├── img_3.webp │ │ ├── img_4.webp │ │ ├── img_5.webp │ │ ├── img_6.webp │ │ └── logo.png │ ├── index.html │ └── main.css ├── video_player_app │ ├── app.css │ ├── app.js │ ├── index.html │ ├── poster.jpg │ ├── vPlayer.js │ └── vids │ │ └── README.txt └── vue_weather_app │ ├── full_project │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── .prettierrc.json │ ├── README.md │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ └── main.css │ │ ├── components │ │ │ ├── BorderLine.vue │ │ │ ├── SearchInput.vue │ │ │ ├── WeatherCard.vue │ │ │ ├── WeatherForecastDay.vue │ │ │ └── WeatherInfo.vue │ │ └── main.js │ ├── tailwind.config.js │ └── vite.config.js │ └── raw_components │ ├── BorderLine.vue │ ├── SearchField.vue │ ├── WeatherCard.vue │ ├── WeatherForecastDay.vue │ └── WeatherInfo.vue ├── TypeScript basics └── README.md ├── Web developer path videos ├── JS_beyond_basics │ └── notes.md ├── Laravel │ ├── Laravel_11 │ │ └── my_app │ │ │ ├── .editorconfig │ │ │ ├── .env.example │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── app │ │ │ ├── Events │ │ │ │ └── UserSubscribed.php │ │ │ ├── Http │ │ │ │ └── Controllers │ │ │ │ │ ├── AuthController.php │ │ │ │ │ ├── Controller.php │ │ │ │ │ ├── DashboardController.php │ │ │ │ │ ├── PostController.php │ │ │ │ │ └── ResetPasswordController.php │ │ │ ├── Listeners │ │ │ │ ├── SendSubscriberEmail.php │ │ │ │ └── UpdateSubscribersTable.php │ │ │ ├── Mail │ │ │ │ └── WelcomeMail.php │ │ │ ├── Models │ │ │ │ ├── Post.php │ │ │ │ └── User.php │ │ │ ├── Policies │ │ │ │ └── PostPolicy.php │ │ │ └── Providers │ │ │ │ └── AppServiceProvider.php │ │ │ ├── artisan │ │ │ ├── bootstrap │ │ │ ├── app.php │ │ │ ├── cache │ │ │ │ └── .gitignore │ │ │ └── providers.php │ │ │ ├── composer.json │ │ │ ├── composer.lock │ │ │ ├── config │ │ │ ├── app.php │ │ │ ├── auth.php │ │ │ ├── cache.php │ │ │ ├── database.php │ │ │ ├── filesystems.php │ │ │ ├── logging.php │ │ │ ├── mail.php │ │ │ ├── queue.php │ │ │ ├── services.php │ │ │ └── session.php │ │ │ ├── database │ │ │ ├── .gitignore │ │ │ ├── factories │ │ │ │ ├── PostFactory.php │ │ │ │ └── UserFactory.php │ │ │ ├── migrations │ │ │ │ ├── 0001_01_01_000000_create_users_table.php │ │ │ │ ├── 0001_01_01_000001_create_cache_table.php │ │ │ │ ├── 0001_01_01_000002_create_jobs_table.php │ │ │ │ ├── 2024_04_04_022307_create_posts_table.php │ │ │ │ └── 2024_05_14_234104_create_subscribers_table.php │ │ │ └── seeders │ │ │ │ └── DatabaseSeeder.php │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── phpunit.xml │ │ │ ├── postcss.config.js │ │ │ ├── public │ │ │ ├── .htaccess │ │ │ ├── favicon.ico │ │ │ ├── index.php │ │ │ └── robots.txt │ │ │ ├── resources │ │ │ ├── css │ │ │ │ └── app.css │ │ │ ├── js │ │ │ │ ├── app.js │ │ │ │ └── bootstrap.js │ │ │ └── views │ │ │ │ ├── auth │ │ │ │ ├── forgot-password.blade.php │ │ │ │ ├── login.blade.php │ │ │ │ ├── register.blade.php │ │ │ │ ├── reset-password.blade.php │ │ │ │ └── verify-email.blade.php │ │ │ │ ├── components │ │ │ │ ├── flashMsg.blade.php │ │ │ │ ├── layout.blade.php │ │ │ │ └── postCard.blade.php │ │ │ │ ├── emails │ │ │ │ ├── email-verification-message.blade.php │ │ │ │ └── welcome.blade.php │ │ │ │ ├── posts │ │ │ │ ├── edit.blade.php │ │ │ │ ├── index.blade.php │ │ │ │ └── show.blade.php │ │ │ │ └── users │ │ │ │ ├── dashboard.blade.php │ │ │ │ └── posts.blade.php │ │ │ ├── routes │ │ │ ├── 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 │ │ │ ├── Feature │ │ │ │ └── ExampleTest.php │ │ │ ├── Pest.php │ │ │ ├── TestCase.php │ │ │ └── Unit │ │ │ │ └── ExampleTest.php │ │ │ └── vite.config.js │ ├── README.md │ └── part_one │ │ ├── .editorconfig │ │ ├── .env.example │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── README.md │ │ ├── app │ │ ├── Console │ │ │ └── Kernel.php │ │ ├── Exceptions │ │ │ └── Handler.php │ │ ├── Http │ │ │ ├── Controllers │ │ │ │ ├── Auth │ │ │ │ │ ├── LoginController.php │ │ │ │ │ ├── LogoutController.php │ │ │ │ │ └── RegisterController.php │ │ │ │ ├── Controller.php │ │ │ │ └── DashboardController.php │ │ │ ├── Kernel.php │ │ │ └── Middleware │ │ │ │ ├── Authenticate.php │ │ │ │ ├── EncryptCookies.php │ │ │ │ ├── PreventRequestsDuringMaintenance.php │ │ │ │ ├── RedirectIfAuthenticated.php │ │ │ │ ├── TrimStrings.php │ │ │ │ ├── TrustHosts.php │ │ │ │ ├── TrustProxies.php │ │ │ │ ├── ValidateSignature.php │ │ │ │ └── VerifyCsrfToken.php │ │ ├── Models │ │ │ └── User.php │ │ └── Providers │ │ │ ├── AppServiceProvider.php │ │ │ ├── AuthServiceProvider.php │ │ │ ├── BroadcastServiceProvider.php │ │ │ ├── EventServiceProvider.php │ │ │ └── RouteServiceProvider.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 │ │ ├── hashing.php │ │ ├── logging.php │ │ ├── mail.php │ │ ├── queue.php │ │ ├── sanctum.php │ │ ├── services.php │ │ ├── session.php │ │ └── view.php │ │ ├── database │ │ ├── .gitignore │ │ ├── factories │ │ │ └── UserFactory.php │ │ ├── migrations │ │ │ ├── 2014_10_12_000000_create_users_table.php │ │ │ ├── 2014_10_12_100000_create_password_reset_tokens_table.php │ │ │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ │ │ └── 2019_12_14_000001_create_personal_access_tokens_table.php │ │ └── seeders │ │ │ └── DatabaseSeeder.php │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── phpunit.xml │ │ ├── postcss.config.js │ │ ├── public │ │ ├── .htaccess │ │ ├── favicon.ico │ │ ├── index.php │ │ └── robots.txt │ │ ├── resources │ │ ├── css │ │ │ └── app.css │ │ ├── js │ │ │ ├── app.js │ │ │ └── bootstrap.js │ │ └── views │ │ │ ├── auth │ │ │ ├── login.blade.php │ │ │ └── register.blade.php │ │ │ ├── dashboard.blade.php │ │ │ ├── home.blade.php │ │ │ └── layouts │ │ │ └── main.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 │ │ │ └── ExampleTest.php │ │ ├── TestCase.php │ │ └── Unit │ │ │ └── ExampleTest.php │ │ └── vite.config.js ├── PHP_full │ ├── OOP_and_PDO │ │ ├── README.md │ │ ├── config.php │ │ └── index.php │ ├── basics │ │ └── README.md │ └── superglobals_and_forms │ │ ├── README.md │ │ ├── config │ │ └── db_config.php │ │ ├── file_upload.php │ │ ├── index.php │ │ ├── layouts │ │ ├── footer.php │ │ └── header.php │ │ ├── markup.html │ │ └── post_create.php ├── Vue_composition_api │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── .prettierrc.json │ ├── .vscode │ │ └── extensions.json │ ├── README.MD │ ├── db.json │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ └── main.css │ │ ├── components │ │ │ ├── MyWrapper.vue │ │ │ └── PostItem.vue │ │ ├── main.js │ │ ├── router │ │ │ └── index.js │ │ ├── stores │ │ │ └── posts.js │ │ └── views │ │ │ ├── HomeView.vue │ │ │ └── PostCreate.vue │ └── vite.config.js ├── Vue_options_api │ ├── App.js │ ├── TheWatcher.js │ ├── UserCreate.js │ ├── UserList.js │ └── index.html └── laravel_Inertia_Vue │ ├── .editorconfig │ ├── .env.example │ ├── .gitattributes │ ├── .gitignore │ ├── README.md │ ├── app │ ├── Http │ │ ├── Controllers │ │ │ ├── AuthController.php │ │ │ ├── Controller.php │ │ │ └── HomeController.php │ │ └── Middleware │ │ │ └── HandleInertiaRequests.php │ ├── Models │ │ └── User.php │ ├── Policies │ │ └── UserPolicy.php │ └── Providers │ │ └── AppServiceProvider.php │ ├── artisan │ ├── bootstrap │ ├── app.php │ ├── cache │ │ └── .gitignore │ └── providers.php │ ├── composer.json │ ├── composer.lock │ ├── config │ ├── app.php │ ├── auth.php │ ├── cache.php │ ├── database.php │ ├── filesystems.php │ ├── logging.php │ ├── mail.php │ ├── queue.php │ ├── services.php │ └── session.php │ ├── database │ ├── .gitignore │ ├── factories │ │ └── UserFactory.php │ ├── migrations │ │ ├── 0001_01_01_000000_create_users_table.php │ │ ├── 0001_01_01_000001_create_cache_table.php │ │ └── 0001_01_01_000002_create_jobs_table.php │ └── seeders │ │ └── DatabaseSeeder.php │ ├── package-lock.json │ ├── package.json │ ├── phpunit.xml │ ├── postcss.config.js │ ├── public │ ├── .htaccess │ ├── favicon.ico │ ├── index.php │ └── robots.txt │ ├── resources │ ├── css │ │ └── app.css │ ├── js │ │ ├── Layouts │ │ │ └── Layout.vue │ │ ├── Pages │ │ │ ├── Auth │ │ │ │ ├── Login.vue │ │ │ │ └── Register.vue │ │ │ ├── Components │ │ │ │ ├── PaginationLinks.vue │ │ │ │ └── TextInput.vue │ │ │ ├── Dashboard.vue │ │ │ └── Home.vue │ │ ├── app.js │ │ └── bootstrap.js │ └── views │ │ └── app.blade.php │ ├── routes │ ├── 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 │ ├── Feature │ │ └── ExampleTest.php │ ├── Pest.php │ ├── TestCase.php │ └── Unit │ │ └── ExampleTest.php │ └── vite.config.js └── tailwind_classes.css /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 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 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 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 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpactor.json 12 | .phpunit.result.cache 13 | Homestead.json 14 | Homestead.yaml 15 | auth.json 16 | npm-debug.log 17 | yarn-error.log 18 | /.fleet 19 | /.idea 20 | /.vscode 21 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | protected $fillable = [ 20 | 'name', 21 | 'email', 22 | 'password', 23 | ]; 24 | 25 | /** 26 | * The attributes that should be hidden for serialization. 27 | * 28 | * @var array 29 | */ 30 | protected $hidden = [ 31 | 'password', 32 | 'remember_token', 33 | ]; 34 | 35 | /** 36 | * Get the attributes that should be cast. 37 | * 38 | * @return array 39 | */ 40 | protected function casts(): array 41 | { 42 | return [ 43 | 'email_verified_at' => 'datetime', 44 | 'password' => 'hashed', 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | handleCommand(new ArgvInput); 14 | 15 | exit($status); 16 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/bootstrap/app.php: -------------------------------------------------------------------------------- 1 | withRouting( 10 | web: __DIR__.'/../routes/web.php', 11 | commands: __DIR__.'/../routes/console.php', 12 | health: '/up', 13 | ) 14 | ->withMiddleware(function (Middleware $middleware) { 15 | $middleware->web(append: [ 16 | HandleInertiaRequests::class, 17 | ]); 18 | }) 19 | ->withExceptions(function (Exceptions $exceptions) { 20 | // 21 | })->create(); 22 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class PostFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'body' => fake()->text(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/database/migrations/0001_01_01_000001_create_cache_table.php: -------------------------------------------------------------------------------- 1 | string('key')->primary(); 16 | $table->mediumText('value'); 17 | $table->integer('expiration'); 18 | }); 19 | 20 | Schema::create('cache_locks', function (Blueprint $table) { 21 | $table->string('key')->primary(); 22 | $table->string('owner'); 23 | $table->integer('expiration'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('cache'); 33 | Schema::dropIfExists('cache_locks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/database/migrations/2024_05_26_100246_create_posts_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->text('body'); 17 | $table->timestamps(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('posts'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 18 | 19 | Post::factory(2)->create(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build" 7 | }, 8 | "devDependencies": { 9 | "@vitejs/plugin-react": "^4.3.0", 10 | "autoprefixer": "^10.4.19", 11 | "axios": "^1.6.4", 12 | "laravel-vite-plugin": "^1.0", 13 | "postcss": "^8.4.38", 14 | "tailwindcss": "^3.4.3", 15 | "vite": "^5.0" 16 | }, 17 | "dependencies": { 18 | "@inertiajs/react": "^1.0.16", 19 | "react": "^18.3.1", 20 | "react-dom": "^18.3.1" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/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 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Laravel Inertia React series/laravel_inertia_react/public/favicon.ico -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/public/index.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 18 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/resources/js/Layouts/Layout.jsx: -------------------------------------------------------------------------------- 1 | import { Link } from "@inertiajs/react"; 2 | 3 | export default function Layout({ children }) { 4 | return ( 5 | <> 6 |
7 | 15 |
16 | 17 |
{children}
18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/resources/js/app.jsx: -------------------------------------------------------------------------------- 1 | import "./bootstrap"; 2 | import "../css/app.css"; 3 | 4 | import { createInertiaApp } from "@inertiajs/react"; 5 | import { createRoot } from "react-dom/client"; 6 | import Layout from "@/Layouts/Layout"; 7 | 8 | createInertiaApp({ 9 | title: (title) => 10 | title ? `${title} - Laravel Inertia React` : "Laravel Inertia React", 11 | resolve: (name) => { 12 | const pages = import.meta.glob("./Pages/**/*.jsx", { eager: true }); 13 | let page = pages[`./Pages/${name}.jsx`]; 14 | page.default.layout = 15 | page.default.layout || ((page) => ); 16 | return page; 17 | }, 18 | setup({ el, App, props }) { 19 | createRoot(el).render(); 20 | }, 21 | progress: { 22 | color: "#fff", 23 | showSpinner: true, 24 | }, 25 | }); 26 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | window.axios = axios; 3 | 4 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 5 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/resources/views/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @viteReactRefresh 8 | @vite('resources/js/app.jsx') 9 | @inertiaHead 10 | @routes 11 | 12 | 13 | @inertia 14 | 15 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote')->hourly(); 9 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/routes/web.php: -------------------------------------------------------------------------------- 1 | except('index'); 10 | 11 | 12 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/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 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./resources/**/*.blade.php", 5 | "./resources/**/*.jsx", 6 | "./resources/**/*.js", 7 | ], 8 | theme: { 9 | extend: {}, 10 | }, 11 | plugins: [], 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 5 | 6 | $response->assertStatus(200); 7 | }); 8 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | toBeTrue(); 5 | }); 6 | -------------------------------------------------------------------------------- /Laravel Inertia React series/laravel_inertia_react/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import laravel from "laravel-vite-plugin"; 3 | import react from "@vitejs/plugin-react"; 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | laravel({ 8 | input: "resources/js/app.jsx", 9 | refresh: true, 10 | }), 11 | react(), 12 | ], 13 | resolve: { 14 | alias: { 15 | "@": "/resources/js", 16 | }, 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 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 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 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 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpactor.json 12 | .phpunit.result.cache 13 | Homestead.json 14 | Homestead.yaml 15 | auth.json 16 | npm-debug.log 17 | yarn-error.log 18 | /.fleet 19 | /.idea 20 | /.vscode 21 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/app/Policies/PostPolicy.php: -------------------------------------------------------------------------------- 1 | id === $post->user_id 14 | ? Response::allow() 15 | : Response::deny('You do not own this post'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | handleCommand(new ArgvInput); 14 | 15 | exit($status); 16 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/bootstrap/app.php: -------------------------------------------------------------------------------- 1 | withRouting( 9 | web: __DIR__.'/../routes/web.php', 10 | api: __DIR__.'/../routes/api.php', 11 | commands: __DIR__.'/../routes/console.php', 12 | health: '/up', 13 | ) 14 | ->withMiddleware(function (Middleware $middleware) { 15 | // 16 | }) 17 | ->withExceptions(function (Exceptions $exceptions) { 18 | // 19 | })->create(); 20 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class PostFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/database/migrations/0001_01_01_000001_create_cache_table.php: -------------------------------------------------------------------------------- 1 | string('key')->primary(); 16 | $table->mediumText('value'); 17 | $table->integer('expiration'); 18 | }); 19 | 20 | Schema::create('cache_locks', function (Blueprint $table) { 21 | $table->string('key')->primary(); 22 | $table->string('owner'); 23 | $table->integer('expiration'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('cache'); 33 | Schema::dropIfExists('cache_locks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/database/migrations/2024_06_18_042605_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->morphs('tokenable'); 17 | $table->string('name'); 18 | $table->string('token', 64)->unique(); 19 | $table->text('abilities')->nullable(); 20 | $table->timestamp('last_used_at')->nullable(); 21 | $table->timestamp('expires_at')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('personal_access_tokens'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/database/migrations/2024_06_18_043822_create_posts_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->foreignId('user_id')->constrained()->cascadeOnDelete(); 17 | $table->string('title'); 18 | $table->text('body'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('posts'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | 18 | User::factory()->create([ 19 | 'name' => 'Test User', 20 | 'email' => 'test@example.com', 21 | ]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/database/seeders/PostSeeder.php: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Laravel Sanctum API series/laravel-api-app/public/favicon.ico -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/public/index.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 18 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/resources/css/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Laravel Sanctum API series/laravel-api-app/resources/css/app.css -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | window.axios = axios; 3 | 4 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 5 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/routes/api.php: -------------------------------------------------------------------------------- 1 | user(); 10 | })->middleware('auth:sanctum'); 11 | 12 | Route::apiResource('posts', PostController::class); 13 | 14 | Route::post('/register', [AuthController::class, 'register']); 15 | Route::post('/login', [AuthController::class, 'login']); 16 | 17 | Route::post('/logout', [AuthController::class, 'logout'])->middleware('auth:sanctum'); 18 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote')->hourly(); 9 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/routes/web.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-app/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | laravel({ 7 | input: ['resources/css/app.css', 'resources/js/app.js'], 8 | refresh: true, 9 | }), 10 | ], 11 | }); 12 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react/jsx-no-target-blank': 'off', 16 | 'react-refresh/only-export-components': [ 17 | 'warn', 18 | { allowConstantExport: true }, 19 | ], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/README.md: -------------------------------------------------------------------------------- 1 | # React + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel_api_react", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^18.3.1", 14 | "react-dom": "^18.3.1", 15 | "react-router-dom": "^6.24.0" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^18.3.3", 19 | "@types/react-dom": "^18.3.0", 20 | "@vitejs/plugin-react": "^4.3.1", 21 | "autoprefixer": "^10.4.19", 22 | "eslint": "^8.57.0", 23 | "eslint-plugin-react": "^7.34.2", 24 | "eslint-plugin-react-hooks": "^4.6.2", 25 | "eslint-plugin-react-refresh": "^0.4.7", 26 | "postcss": "^8.4.38", 27 | "tailwindcss": "^3.4.4", 28 | "vite": "^5.3.1" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/src/Context/AppContext.jsx: -------------------------------------------------------------------------------- 1 | import { createContext, useEffect, useState } from "react"; 2 | 3 | export const AppContext = createContext(); 4 | 5 | export default function AppProvider({ children }) { 6 | const [token, setToken] = useState(localStorage.getItem("token")); 7 | const [user, setUser] = useState(null); 8 | 9 | async function getUser() { 10 | const res = await fetch("/api/user", { 11 | headers: { 12 | Authorization: `Bearer ${token}`, 13 | }, 14 | }); 15 | const data = await res.json(); 16 | 17 | if (res.ok) { 18 | setUser(data); 19 | } 20 | } 21 | 22 | useEffect(() => { 23 | if (token) { 24 | getUser(); 25 | } 26 | }, [token]); 27 | 28 | return ( 29 | 30 | {children} 31 | 32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/src/main.jsx: -------------------------------------------------------------------------------- 1 | import ReactDOM from "react-dom/client"; 2 | import App from "./App.jsx"; 3 | import AppProvider from "./Context/AppContext.jsx"; 4 | 5 | ReactDOM.createRoot(document.getElementById("root")).render( 6 | 7 | 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: ["./index.html", "./src/**/*.{js,jsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-react-app/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | server: { 8 | proxy:{ 9 | '/api': { 10 | target: 'http://127.0.0.1:8000', 11 | changeOrigin: true, 12 | headers:{ 13 | Accept: 'application/json', 14 | "Content-Type": 'application/json', 15 | } 16 | } 17 | } 18 | } 19 | }) 20 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | 30 | *.tsbuildinfo 31 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/README.md: -------------------------------------------------------------------------------- 1 | # laravel_api_vue 2 | 3 | This template should help get you started developing with Vue 3 in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). 8 | 9 | ## Customize configuration 10 | 11 | See [Vite Configuration Reference](https://vitejs.dev/config/). 12 | 13 | ## Project Setup 14 | 15 | ```sh 16 | npm install 17 | ``` 18 | 19 | ### Compile and Hot-Reload for Development 20 | 21 | ```sh 22 | npm run dev 23 | ``` 24 | 25 | ### Compile and Minify for Production 26 | 27 | ```sh 28 | npm run build 29 | ``` 30 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "@/*": ["./src/*"] 5 | } 6 | }, 7 | "exclude": ["node_modules", "dist"] 8 | } 9 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel_api_vue", 3 | "version": "0.0.0", 4 | "private": true, 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "pinia": "^2.1.7", 13 | "vue": "^3.4.29", 14 | "vue-router": "^4.3.3" 15 | }, 16 | "devDependencies": { 17 | "@vitejs/plugin-vue": "^5.0.5", 18 | "autoprefixer": "^10.4.19", 19 | "postcss": "^8.4.39", 20 | "tailwindcss": "^3.4.4", 21 | "vite": "^5.3.1" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 38 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/src/main.js: -------------------------------------------------------------------------------- 1 | import './assets/main.css' 2 | 3 | import { createApp, markRaw } from 'vue' 4 | import { createPinia } from 'pinia' 5 | 6 | import App from './App.vue' 7 | import router from './router' 8 | 9 | const app = createApp(App) 10 | const pinia = createPinia() 11 | 12 | pinia.use(({store}) => { 13 | store.router = markRaw(router) 14 | }) 15 | 16 | app.use(pinia) 17 | app.use(router) 18 | 19 | app.mount('#app') 20 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/src/views/Posts/CreateView.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 41 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{vue,js}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Laravel Sanctum API series/laravel-api-vue-app/vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "node:url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | server: { 15 | proxy: { 16 | "/api": { 17 | target: "http://127.0.0.1:8000", 18 | changeOrigin: true, 19 | headers: { 20 | Accept: "application/json", 21 | "Content-Type": "application/json", 22 | }, 23 | }, 24 | }, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /MERN stack/React_basics/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react-refresh/only-export-components': [ 16 | 'warn', 17 | { allowConstantExport: true }, 18 | ], 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /MERN stack/React_basics/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /MERN stack/React_basics/README.md: -------------------------------------------------------------------------------- 1 | # React + Vite | Watch the video 👇 2 | 3 | [![Let's learn REACT JS basics in 2023.](https://i3.ytimg.com/vi/R7TDoF7JaQA/maxresdefault.jpg)](https://youtu.be/R7TDoF7JaQA?si=NeT5NleA3F4PEliT) 4 | -------------------------------------------------------------------------------- /MERN stack/React_basics/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "posts": [ 3 | { 4 | "title": "Games and books", 5 | "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 6 | "created_at": "10/25/2023", 7 | "id": 1 8 | }, 9 | { 10 | "title": "Best JS framework", 11 | "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 12 | "created_at": "11/10/2023", 13 | "id": 2 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /MERN stack/React_basics/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /MERN stack/React_basics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-basics", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0" 15 | }, 16 | "devDependencies": { 17 | "@types/react": "^18.2.37", 18 | "@types/react-dom": "^18.2.15", 19 | "@vitejs/plugin-react": "^4.2.0", 20 | "autoprefixer": "^10.4.16", 21 | "eslint": "^8.53.0", 22 | "eslint-plugin-react": "^7.33.2", 23 | "eslint-plugin-react-hooks": "^4.6.0", 24 | "eslint-plugin-react-refresh": "^0.4.4", 25 | "postcss": "^8.4.31", 26 | "react-router-dom": "^6.20.0", 27 | "tailwindcss": "^3.3.5", 28 | "vite": "^5.0.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MERN stack/React_basics/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /MERN stack/React_basics/src/App.jsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 2 | import Layout from "./layouts/Layout"; 3 | import Home from "./pages/Home"; 4 | import PostCreate from "./pages/PostCreate"; 5 | import NoPage from "./pages/NoPage"; 6 | 7 | function App() { 8 | return ( 9 | 10 | 11 | }> 12 | } /> 13 | } /> 14 | } /> 15 | 16 | 17 | 18 | ); 19 | } 20 | 21 | export default App; 22 | -------------------------------------------------------------------------------- /MERN stack/React_basics/src/assets/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /MERN stack/React_basics/src/components/PostItem.jsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/prop-types */ 2 | const PostItem = ({ posts, handleDelete }) => { 3 | return ( 4 | <> 5 | {posts.map((post) => ( 6 |
7 |
8 |
9 |

10 | {post.title} 11 |

12 | 13 | Posted on: {post.created_at} 14 | 15 |
16 | 22 |
23 |

{post.body}

24 |
25 | ))} 26 | 27 | ); 28 | }; 29 | 30 | export default PostItem; 31 | -------------------------------------------------------------------------------- /MERN stack/React_basics/src/layouts/Layout.jsx: -------------------------------------------------------------------------------- 1 | import { Link, Outlet } from "react-router-dom"; 2 | 3 | const Layout = () => { 4 | return ( 5 | <> 6 |
7 | 24 |
25 | 26 |
27 | 28 |
29 | 30 | ); 31 | }; 32 | 33 | export default Layout; 34 | -------------------------------------------------------------------------------- /MERN stack/React_basics/src/main.jsx: -------------------------------------------------------------------------------- 1 | import ReactDOM from "react-dom/client"; 2 | import App from "./App.jsx"; 3 | import "./assets/index.css"; 4 | 5 | const root = document.getElementById("root"); 6 | 7 | ReactDOM.createRoot(root).render(); 8 | -------------------------------------------------------------------------------- /MERN stack/React_basics/src/pages/Home.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from "react"; 2 | import PostItem from "../components/PostItem"; 3 | 4 | const Home = () => { 5 | const [posts, setPosts] = useState([]); 6 | const [loading, setLoading] = useState(true); 7 | const [error, setError] = useState(null); 8 | 9 | useEffect(() => { 10 | fetch("http://localhost:3000/posts") 11 | .then((res) => res.json()) 12 | .then((data) => { 13 | data.sort((a, b) => new Date(b.created_at) - new Date(a.created_at)); 14 | setPosts(data); 15 | setLoading(false); 16 | }) 17 | .catch((err) => { 18 | setError(err.message); 19 | setLoading(false); 20 | }); 21 | }, []); 22 | 23 | const handleDelete = (id) => { 24 | setPosts(posts.filter((posts) => posts.id !== id)); 25 | 26 | fetch("http://localhost:3000/posts/" + id, { 27 | method: "DELETE", 28 | }); 29 | }; 30 | 31 | return ( 32 | <> 33 | {loading &&

Loading...

} 34 | {error &&

{error}

} 35 | 36 | 37 | ); 38 | }; 39 | 40 | export default Home; 41 | -------------------------------------------------------------------------------- /MERN stack/React_basics/src/pages/NoPage.jsx: -------------------------------------------------------------------------------- 1 | const NoPage = () => { 2 | return ( 3 | <> 4 |

404

5 |

Page not found

6 | 7 | ); 8 | }; 9 | 10 | export default NoPage; 11 | -------------------------------------------------------------------------------- /MERN stack/React_basics/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /MERN stack/React_basics/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/backend/.env: -------------------------------------------------------------------------------- 1 | SECRET=MY$ecretPhrase! -------------------------------------------------------------------------------- /MERN stack/mern_2024/backend/middlewares/auth.js: -------------------------------------------------------------------------------- 1 | import jwt from "jsonwebtoken"; 2 | import User from "../models/UserModel.js"; 3 | 4 | const auth = async (req, res, next) => { 5 | // Check if the request headers contains the authorization key 6 | const { authorization } = req.headers; 7 | if (!authorization) { 8 | return res.status(401).json({ error: "Authorization token not found" }); 9 | } 10 | 11 | // Grab the token from headers (taking the "Bearer " string away) 12 | const token = authorization.split(" ")[1]; 13 | 14 | try { 15 | // Decode and extract the user id from token 16 | const { _id } = jwt.verify(token, process.env.SECRET); 17 | // Save the user in request 18 | req.user = await User.findById(_id).select("_id"); 19 | 20 | // Go to the next function/middleware 21 | next(); 22 | } catch (error) { 23 | res.status(401).json({ error: error.message }); 24 | } 25 | }; 26 | 27 | export default auth -------------------------------------------------------------------------------- /MERN stack/mern_2024/backend/models/PostModel.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | // Creating post schema using Mongoose Schema class 4 | const PostSchema = new mongoose.Schema({ 5 | user: { 6 | type: mongoose.Schema.Types.ObjectId, 7 | required: true, 8 | ref: "User" 9 | }, 10 | title: { 11 | type: String, 12 | required: true, 13 | }, 14 | body: { 15 | type: String, 16 | required: true, 17 | } 18 | }, { timestamps: true }) 19 | 20 | 21 | // Creating a model from schema 22 | const Post = mongoose.model("Post", PostSchema) 23 | 24 | export default Post -------------------------------------------------------------------------------- /MERN stack/mern_2024/backend/models/UserModel.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | // Creating post schema using Mongoose Schema class 4 | const UserSchema = new mongoose.Schema( 5 | { 6 | email: { 7 | type: String, 8 | required: true, 9 | unique: true, 10 | }, 11 | password: { 12 | type: String, 13 | required: true, 14 | }, 15 | }, 16 | { timestamps: true } 17 | ); 18 | 19 | // Creating a model from schema 20 | const User = mongoose.model("User", UserSchema); 21 | 22 | export default User; 23 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "type": "module", 4 | "version": "1.0.0", 5 | "description": "", 6 | "main": "index.js", 7 | "scripts": { 8 | "server" : "nodemon server.js" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "bcryptjs": "^2.4.3", 14 | "dotenv": "^16.4.1", 15 | "express": "^4.18.2", 16 | "jsonwebtoken": "^9.0.2", 17 | "mongodb": "^6.3.0", 18 | "mongoose": "^8.1.1", 19 | "nodemon": "^3.0.3" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/backend/routes/postsRoutes.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import { 3 | getPosts, 4 | getUserPosts, 5 | addPost, 6 | deletePost, 7 | updatePost, 8 | } from "../controllers/postsController.js"; 9 | import auth from "../middlewares/auth.js"; 10 | 11 | // Creating an instance of Express router 12 | const router = express.Router(); 13 | 14 | // Get all posts route 15 | router.get("/", getPosts); 16 | 17 | // Get user's posts route 18 | router.get("/user", auth, getUserPosts); 19 | 20 | // Add new post route 21 | router.post("/", auth, addPost); 22 | 23 | // Delete post route 24 | router.delete("/:id", auth, deletePost); 25 | 26 | // Update post route 27 | router.put("/:id", auth, updatePost); 28 | 29 | export { router as postsRoutes }; 30 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/backend/routes/usersRoutes.js: -------------------------------------------------------------------------------- 1 | import express from 'express' 2 | import { registerUser, loginUser } from '../controllers/usersController.js' 3 | 4 | // Creating an instance of Express router 5 | const router = express.Router() 6 | 7 | // Register user route 8 | router.post('/', registerUser) 9 | 10 | // Login user route 11 | router.post('/login', loginUser) 12 | 13 | export { router as usersRoutes } -------------------------------------------------------------------------------- /MERN stack/mern_2024/backend/server.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import mongoose from "mongoose"; 3 | import { postsRoutes } from "./routes/postsRoutes.js"; 4 | import { usersRoutes } from "./routes/usersRoutes.js"; 5 | 6 | // Initializing Express app 7 | const app = express(); 8 | 9 | // Middleware to receive JSON 10 | app.use(express.json()); 11 | 12 | // Adding the API end-points and the route handlers 13 | app.use("/api/posts", postsRoutes); 14 | app.use("/api/users", usersRoutes); 15 | 16 | // Connecting to MongoDB using Mongoose 17 | mongoose 18 | .connect("mongodb://localhost:27017", { dbName: "demo_db" }) 19 | .then(() => { 20 | console.log("connected to DB successfully"); 21 | 22 | // Listening to requests if DB connection is successful 23 | app.listen(4000, "localhost", () => console.log("Listening to port 4000")); 24 | }) 25 | .catch((err) => console.log(err)); 26 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/README.md: -------------------------------------------------------------------------------- 1 | # MERN stack frontend notes 2 | 3 | ### 👉 Install the dependencies using `npm install` 4 | 5 | ### 👉 In `vite.config.js` set the `target` to your local server address 6 | 7 | ## Watch PART 2 video 👇 8 | ## [![Watch the video here](https://i3.ytimg.com/vi/3lbi7S26QYw/maxresdefault.jpg)](https://youtu.be/3lbi7S26QYw) 9 | 10 | ## Watch PART 1 video 👇 11 | ## [![Watch the video here](https://i3.ytimg.com/vi/rAOuOcXz81E/maxresdefault.jpg)](https://youtu.be/rAOuOcXz81E) 12 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vite + React 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-router-dom": "^6.22.0" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^18.2.43", 19 | "@types/react-dom": "^18.2.17", 20 | "@vitejs/plugin-react": "^4.2.1", 21 | "autoprefixer": "^10.4.17", 22 | "eslint": "^8.55.0", 23 | "eslint-plugin-react": "^7.33.2", 24 | "eslint-plugin-react-hooks": "^4.6.0", 25 | "eslint-plugin-react-refresh": "^0.4.5", 26 | "postcss": "^8.4.33", 27 | "tailwindcss": "^3.4.1", 28 | "vite": "^5.0.8" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/Components/Alert.jsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/prop-types */ 2 | const Alert = ({ msg }) => { 3 | return ( 4 |
5 | {msg} 6 |
7 | ); 8 | }; 9 | 10 | export default Alert; 11 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/Components/Post.jsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/prop-types */ 2 | const Post = ({ post, children }) => { 3 | return ( 4 |
5 | 6 |
7 |
8 |

{post.title}

9 |

{new Date(post.createdAt).toLocaleDateString()}

10 |
11 | 12 |
{children}
13 |
14 | 15 |

{post.body}

16 | 17 |
18 |
19 | ); 20 | }; 21 | 22 | export default Post; 23 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/Components/Success.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | 3 | /* eslint-disable react/prop-types */ 4 | const Success = ({ msg }) => { 5 | const [show, setShow] = useState(true); 6 | 7 | // Remove this component after 2 seconds 8 | setTimeout(() => setShow(false), 2000); 9 | 10 | return ( 11 |
12 | {show && ( 13 |
14 | {msg} 15 |
16 | )} 17 |
18 | ); 19 | }; 20 | 21 | export default Success; 22 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/Routes/AuthRoutes.jsx: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import { Navigate, Outlet } from "react-router-dom"; 3 | 4 | import { UserContext } from "../contexts/UserContext"; 5 | 6 | const AuthRoutes = () => { 7 | const { user } = useContext(UserContext); 8 | 9 | // Check if User email is true/exist then show the proper routes otherwise redirect to Login page 10 | return user.email ? : ; 11 | }; 12 | 13 | export default AuthRoutes; 14 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/Routes/GuestRoutes.jsx: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import { Navigate, Outlet } from "react-router-dom"; 3 | 4 | import { UserContext } from "../contexts/UserContext"; 5 | 6 | const GuestRoutes = () => { 7 | const { user } = useContext(UserContext); 8 | 9 | // Check if User email is NOT true/exist then show the proper routes otherwise redirect to Dashboard page 10 | return !user.email ? : ; 11 | }; 12 | 13 | export default GuestRoutes; 14 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/assets/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer components { 6 | .nav-link { 7 | @apply w-8 h-8 rounded-md hover:bg-indigo-600 grid place-items-center 8 | } 9 | .card { 10 | @apply bg-white px-6 py-10 rounded-lg shadow-lg 11 | } 12 | .title { 13 | @apply font-bold mb-8 text-2xl 14 | } 15 | .input { 16 | @apply block w-full rounded-md p-2 placeholder:text-sm border-0 outline-0 ring-1 ring-indigo-500 focus:ring-2 mb-4 17 | } 18 | .btn { 19 | @apply block w-full bg-indigo-500 text-white rounded-md p-2 active:bg-indigo-600 20 | } 21 | } -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/contexts/PostContext.jsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/prop-types */ 2 | import { createContext, useState } from "react"; 3 | 4 | // Post context to be used in useContext hook 5 | export const PostContext = createContext(); 6 | 7 | const PostProvider = ({ children }) => { 8 | // Posts global state 9 | const [posts, setPosts] = useState([]); 10 | 11 | // Return a custom component to expose Post state to the children components 12 | return ( 13 | 14 | {children} 15 | 16 | ); 17 | }; 18 | 19 | export default PostProvider; 20 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/contexts/UserContext.jsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/prop-types */ 2 | import { createContext, useState } from "react"; 3 | 4 | // User context to be used in useContext hook 5 | export const UserContext = createContext(); 6 | 7 | const UserProvider = ({ children }) => { 8 | // User global state 9 | const [user, setUser] = useState({ 10 | email: localStorage.getItem("email"), 11 | posts: [], 12 | }); 13 | 14 | // Return a custom component to expose User state to the children components 15 | return ( 16 | 17 | {children} 18 | 19 | ); 20 | }; 21 | 22 | export default UserProvider; 23 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App.jsx"; 4 | import "./assets/app.css"; 5 | import UserProvider from "./contexts/UserContext.jsx"; 6 | import PostProvider from "./contexts/PostContext.jsx"; 7 | 8 | ReactDOM.createRoot(document.getElementById("root")).render( 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ); 17 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /MERN stack/mern_2024/frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | server: { 8 | proxy: { 9 | '/api' : { 10 | target: "http://localhost:4000", 11 | changeOrigin: true 12 | } 13 | } 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /React Hooks/useContext/README.md: -------------------------------------------------------------------------------- 1 | # REACT HOOKS Explained | useContext hook with two examples (Learn React in 2024) | Watch the video 👇 2 | 3 | [![REACT HOOKS Explained | useContext hook with two examples (Learn React in 2024)](https://i3.ytimg.com/vi/hY9K6bU-wok/maxresdefault.jpg)](https://youtu.be/hY9K6bU-wok?si=LJjLPajT1BYi1jkV) 4 | 5 | -------------------------------------------------------------------------------- /React Hooks/useContext/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /React Hooks/useContext/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-state", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0" 15 | }, 16 | "devDependencies": { 17 | "@types/react": "^18.2.43", 18 | "@types/react-dom": "^18.2.17", 19 | "@vitejs/plugin-react": "^4.2.1", 20 | "eslint": "^8.55.0", 21 | "eslint-plugin-react": "^7.33.2", 22 | "eslint-plugin-react-hooks": "^4.6.0", 23 | "eslint-plugin-react-refresh": "^0.4.5", 24 | "vite": "^5.0.8" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /React Hooks/useContext/src/App.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import Posts from "./Posts"; 3 | import { MyContext } from "./MyContext"; 4 | 5 | function App() { 6 | const [posts, setPosts] = useState([{ id: 1, title: "post 1" }]); 7 | 8 | return ( 9 | // Wrap all the components with the context provider and add the value 10 | 11 |

React Hooks: useContext

12 | 13 |
14 | ); 15 | } 16 | 17 | export default App; 18 | -------------------------------------------------------------------------------- /React Hooks/useContext/src/Form.jsx: -------------------------------------------------------------------------------- 1 | import { useContext, useRef } from "react"; 2 | import { MyContext } from "./MyContext"; 3 | 4 | let nextId = 2 5 | const Form = () => { 6 | // Use the ref hook to grab the value of input field 7 | const title = useRef(); 8 | 9 | // Use the context hook to access the value provided by context provider in App component 10 | const { posts, setPosts } = useContext(MyContext); 11 | 12 | // Add the new post object to the state 13 | const handleAdd = () => { 14 | setPosts([...posts, { id: nextId++, title: title.current.value }]) 15 | }; 16 | 17 | return ( 18 | <> 19 | 20 | 21 | 22 | ); 23 | }; 24 | 25 | export default Form; 26 | -------------------------------------------------------------------------------- /React Hooks/useContext/src/MyContext.js: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | // Create the context 4 | export const MyContext = createContext() -------------------------------------------------------------------------------- /React Hooks/useContext/src/Posts.jsx: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import Form from "./Form"; 3 | import { MyContext } from "./MyContext"; 4 | 5 | const Posts = () => { 6 | 7 | // Use the context hook to access the value provided by context provider in App component 8 | const { posts } = useContext(MyContext) 9 | 10 | return ( 11 | <> 12 |

Posts

13 |
14 | 15 | { posts.length > 0 && 16 | posts.map(p => ( 17 |
18 |

{p.title}

19 |
20 | )) 21 | } 22 | 23 | ); 24 | }; 25 | 26 | export default Posts; 27 | -------------------------------------------------------------------------------- /React Hooks/useContext/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App.jsx"; 4 | 5 | ReactDOM.createRoot(document.getElementById("root")).render( 6 | // Remove the React.StrictMode component to get re-renders once 7 | 8 | 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /React Hooks/useContext/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /React Hooks/useReducer/README.md: -------------------------------------------------------------------------------- 1 | # REACT HOOKS Explained | useReducer hook with Forms and Objects Example (Learn React in 2024) | Watch the video 👇 2 | 3 | [![REACT HOOKS Explained | useReducer hook with Forms and Objects Example (Learn React in 2024)](https://i3.ytimg.com/vi/a7iQWvw8WPI/maxresdefault.jpg)](https://youtu.be/a7iQWvw8WPI?si=Tgme8M4vjSaiuzRs) 4 | 5 | -------------------------------------------------------------------------------- /React Hooks/useReducer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /React Hooks/useReducer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-state", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0" 15 | }, 16 | "devDependencies": { 17 | "@types/react": "^18.2.43", 18 | "@types/react-dom": "^18.2.17", 19 | "@vitejs/plugin-react": "^4.2.1", 20 | "eslint": "^8.55.0", 21 | "eslint-plugin-react": "^7.33.2", 22 | "eslint-plugin-react-hooks": "^4.6.0", 23 | "eslint-plugin-react-refresh": "^0.4.5", 24 | "vite": "^5.0.8" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /React Hooks/useReducer/src/App.jsx: -------------------------------------------------------------------------------- 1 | import SimpleEx from "./SimpleEx"; 2 | import FormEx from "./FormEx"; 3 | import ObjectEx from "./ObjectEx"; 4 | 5 | function App() { 6 | return ( 7 | <> 8 |

React Hooks: useReducer

9 | 10 | 11 | 12 | 13 | 14 | ); 15 | } 16 | 17 | export default App; 18 | -------------------------------------------------------------------------------- /React Hooks/useReducer/src/SimpleEx.jsx: -------------------------------------------------------------------------------- 1 | import { useReducer } from "react"; 2 | 3 | const SimpleEx = () => { 4 | // const [state, dispatch] = useReducer(reducer, initialArg, init?) 5 | 6 | // Reducer function 7 | const nameReducer = (state, action) => 8 | action.type === "change" ? "Jon" : state; 9 | 10 | // Reducer hook 11 | const [name, setName] = useReducer(nameReducer, "Mike"); 12 | 13 | return ( 14 |
15 |

{name}

16 | 23 |
24 | ); 25 | }; 26 | 27 | export default SimpleEx; 28 | -------------------------------------------------------------------------------- /React Hooks/useReducer/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App.jsx"; 4 | 5 | ReactDOM.createRoot(document.getElementById("root")).render( 6 | // Remove the React.StrictMode component to get re-renders once 7 | 8 | 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /React Hooks/useReducer/src/postsReducer.js: -------------------------------------------------------------------------------- 1 | // ID tracker 2 | let nextId = 2; 3 | 4 | export const postsReducer = (state, action) => { 5 | switch (action.type) { 6 | // Add a new object to posts array and return the new array 7 | case "add": 8 | return [...state, { id: nextId++, title: action.title, likes: 0 }]; 9 | 10 | // Return a new array with all the posts except the deleted one 11 | case "delete": 12 | return state.filter((p) => p.id !== action.id); 13 | 14 | // Return a new array with the updated post property 15 | case "like": 16 | return [ 17 | ...state.filter((p) => 18 | p.id === action.id ? (p.likes = p.likes + 1) : p 19 | ), 20 | ]; 21 | 22 | // Return state as is 23 | default: 24 | state; 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /React Hooks/useReducer/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /Tips & tricks videos/JS_components_no_framework/components/footer.js: -------------------------------------------------------------------------------- 1 | const footer = () => { 2 | return /* HTML */ `
5 |
6 |

Moments App

7 |

Share your moments with the world

8 |
9 | 10 |

© 2024, All rights reserved

11 |
`; 12 | }; 13 | 14 | export default footer; 15 | -------------------------------------------------------------------------------- /Tips & tricks videos/JS_components_no_framework/components/header.js: -------------------------------------------------------------------------------- 1 | const header = () => { 2 | return /* HTML */ `
3 | 14 |
`; 15 | }; 16 | 17 | export default header; 18 | -------------------------------------------------------------------------------- /Tips & tricks videos/JS_components_no_framework/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | Document 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Tips & tricks videos/JS_components_no_framework/main.js: -------------------------------------------------------------------------------- 1 | import card from "./components/card.js"; 2 | import header from "./components/header.js"; 3 | import footer from "./components/footer.js"; 4 | 5 | const root = document.getElementById('root') 6 | 7 | const data = [ 8 | { 9 | img: "https://picsum.photos/600?random=1", 10 | user: "Jon Doe", 11 | created_at: "25 Jan, 2024" 12 | }, 13 | { 14 | img: "https://picsum.photos/600?random=2", 15 | user: "Sarah Doe", 16 | created_at: "10 Jan, 2024" 17 | }, 18 | { 19 | img: "https://picsum.photos/600?random=3", 20 | user: "Mike Doe", 21 | created_at: "25 Dec, 2023" 22 | } 23 | ] 24 | 25 | root.insertAdjacentHTML("beforebegin", header()) 26 | root.insertAdjacentHTML("afterend", footer()) 27 | 28 | data.forEach(el => { 29 | 30 | root.innerHTML += card(el.img, el.user, el.created_at) 31 | }) 32 | -------------------------------------------------------------------------------- /Tips & tricks videos/full_website/README.md: -------------------------------------------------------------------------------- 1 | # Notes 2 | 3 | 1. After downloading the file run `npm install` in the terminal 4 | 2. Add your YouTube API key to `yt.js` 5 | 3. Customize the `index.html` as you like 6 | 7 | Thank you 8 | -------------------------------------------------------------------------------- /Tips & tricks videos/full_website/logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/full_website/logo.webp -------------------------------------------------------------------------------- /Tips & tricks videos/full_website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "tailwindcss": "^3.3.3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Tips & tricks videos/full_website/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | darkMode: 'class', 4 | content: [ 5 | "./**/*.js", 6 | "./index.html" 7 | ], 8 | theme: { 9 | extend: {}, 10 | }, 11 | plugins: [], 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Tips & tricks videos/mobile_menu/script.js: -------------------------------------------------------------------------------- 1 | const navBtn = document.querySelector("#nav-btn"); 2 | const navContainer = document.querySelector("#nav-container"); 3 | const blury = document.querySelector(".blury"); 4 | 5 | navBtn.addEventListener("click", function () { 6 | navContainer.classList.toggle("appear"); 7 | 8 | if (navContainer.classList.contains("appear")) { 9 | menuIsOpen(); 10 | } else { 11 | menuIsClosed(); 12 | } 13 | }); 14 | 15 | document.addEventListener("click", function (e) { 16 | if (!navContainer.contains(e.target) && e.target !== navBtn) { 17 | navContainer.classList.remove("appear"); 18 | menuIsClosed(); 19 | } 20 | }); 21 | 22 | function menuIsClosed() { 23 | blury.style.display = "none"; 24 | navBtn.classList.add("fa-bars"); 25 | navBtn.classList.remove("fa-xmark"); 26 | } 27 | 28 | function menuIsOpen() { 29 | blury.style.display = "block"; 30 | navBtn.classList.remove("fa-bars"); 31 | navBtn.classList.add("fa-xmark"); 32 | } 33 | -------------------------------------------------------------------------------- /Tips & tricks videos/responsive_image_flex/images/img_1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/responsive_image_flex/images/img_1.webp -------------------------------------------------------------------------------- /Tips & tricks videos/responsive_image_flex/images/img_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/responsive_image_flex/images/img_2.webp -------------------------------------------------------------------------------- /Tips & tricks videos/responsive_image_flex/images/img_3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/responsive_image_flex/images/img_3.webp -------------------------------------------------------------------------------- /Tips & tricks videos/responsive_image_flex/images/img_4.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/responsive_image_flex/images/img_4.webp -------------------------------------------------------------------------------- /Tips & tricks videos/responsive_image_flex/images/img_5.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/responsive_image_flex/images/img_5.webp -------------------------------------------------------------------------------- /Tips & tricks videos/responsive_image_flex/images/img_6.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/responsive_image_flex/images/img_6.webp -------------------------------------------------------------------------------- /Tips & tricks videos/responsive_image_flex/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/responsive_image_flex/images/logo.png -------------------------------------------------------------------------------- /Tips & tricks videos/video_player_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | Video app 15 | 16 | 17 | 18 |
19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Tips & tricks videos/video_player_app/poster.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Tips & tricks videos/video_player_app/poster.jpg -------------------------------------------------------------------------------- /Tips & tricks videos/video_player_app/vids/README.txt: -------------------------------------------------------------------------------- 1 | PLease add your videos here -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-prettier/skip-formatting' 10 | ], 11 | parserOptions: { 12 | ecmaVersion: 'latest' 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/prettierrc", 3 | "semi": false, 4 | "tabWidth": 2, 5 | "singleQuote": true, 6 | "printWidth": 100, 7 | "trailingComma": "none" 8 | } -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/README.md: -------------------------------------------------------------------------------- 1 | # weather-app 2 | 3 | ## Watch the video 👇 4 | [![Let's build a weather app with VUE.JS, TAILWIND CSS and Weather API](https://i3.ytimg.com/vi/kRetyHCmPUs/maxresdefault.jpg)](https://www.youtube.com/watch?v=kRetyHCmPUs) 5 | 6 | 7 | ## Recommended IDE Setup 8 | 9 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). 10 | 11 | ## Customize configuration 12 | 13 | See [Vite Configuration Reference](https://vitejs.dev/config/). 14 | 15 | ## Project Setup 16 | 17 | ```sh 18 | npm install 19 | ``` 20 | 21 | ### Compile and Hot-Reload for Development 22 | 23 | ```sh 24 | npm run dev 25 | ``` 26 | 27 | ### Compile and Minify for Production 28 | 29 | ```sh 30 | npm run build 31 | ``` 32 | 33 | ### Lint with [ESLint](https://eslint.org/) 34 | 35 | ```sh 36 | npm run lint 37 | ``` 38 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 21 | 22 | Vite App 23 | 24 | 25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weather-app", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview", 9 | "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore", 10 | "format": "prettier --write src/" 11 | }, 12 | "dependencies": { 13 | "vue": "^3.3.4" 14 | }, 15 | "devDependencies": { 16 | "@rushstack/eslint-patch": "^1.3.3", 17 | "@vitejs/plugin-vue": "^4.4.0", 18 | "@vue/eslint-config-prettier": "^8.0.0", 19 | "autoprefixer": "^10.4.16", 20 | "eslint": "^8.49.0", 21 | "eslint-plugin-vue": "^9.17.0", 22 | "postcss": "^8.4.31", 23 | "prettier": "^3.0.3", 24 | "tailwindcss": "^3.3.5", 25 | "vite": "^4.4.11" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/src/App.vue: -------------------------------------------------------------------------------- 1 | 18 | 45 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/src/assets/main.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer base { 6 | body { 7 | font-family: 'Poppins', sans-serif; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/src/components/BorderLine.vue: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/src/components/WeatherForecastDay.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 29 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/src/main.js: -------------------------------------------------------------------------------- 1 | import './assets/main.css' 2 | 3 | import { createApp } from 'vue' 4 | import App from './App.vue' 5 | 6 | createApp(App).mount('#app') 7 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: {} 6 | }, 7 | plugins: [] 8 | } 9 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/full_project/vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from 'node:url' 2 | 3 | import { defineConfig } from 'vite' 4 | import vue from '@vitejs/plugin-vue' 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [ 9 | vue(), 10 | ], 11 | resolve: { 12 | alias: { 13 | '@': fileURLToPath(new URL('./src', import.meta.url)) 14 | } 15 | } 16 | }) 17 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/raw_components/BorderLine.vue: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/raw_components/SearchField.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | -------------------------------------------------------------------------------- /Tips & tricks videos/vue_weather_app/raw_components/WeatherForecastDay.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpunit.result.cache 12 | Homestead.json 13 | Homestead.yaml 14 | auth.json 15 | npm-debug.log 16 | yarn-error.log 17 | /.fleet 18 | /.idea 19 | /.vscode 20 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/app/Events/UserSubscribed.php: -------------------------------------------------------------------------------- 1 | posts()->latest()->paginate(6); 15 | 16 | return view('users.dashboard', ['posts' => $posts]); 17 | } 18 | 19 | public function userPosts(User $user) 20 | { 21 | 22 | $userPosts = $user->posts()->latest()->paginate(6); 23 | 24 | return view('users.posts', [ 25 | 'posts' => $userPosts, 26 | 'user' => $user 27 | ]); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/app/Listeners/SendSubscriberEmail.php: -------------------------------------------------------------------------------- 1 | to($event->user->email); 25 | $message->subject('Thank you'); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/app/Listeners/UpdateSubscribersTable.php: -------------------------------------------------------------------------------- 1 | user->email] 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/app/Models/Post.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/app/Policies/PostPolicy.php: -------------------------------------------------------------------------------- 1 | id === $post->user_id; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | subject('Please Verify Email Address') 27 | ->view('emails.email-verification-message', [ 'url' => $url ]); 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | handleCommand(new ArgvInput); 14 | 15 | exit($status); 16 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/bootstrap/app.php: -------------------------------------------------------------------------------- 1 | withRouting( 9 | web: __DIR__.'/../routes/web.php', 10 | commands: __DIR__.'/../routes/console.php', 11 | health: '/up', 12 | ) 13 | ->withMiddleware(function (Middleware $middleware) { 14 | // 15 | }) 16 | ->withExceptions(function (Exceptions $exceptions) { 17 | // 18 | })->create(); 19 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'token' => env('POSTMARK_TOKEN'), 19 | ], 20 | 21 | 'ses' => [ 22 | 'key' => env('AWS_ACCESS_KEY_ID'), 23 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 24 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 25 | ], 26 | 27 | 'slack' => [ 28 | 'notifications' => [ 29 | 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), 30 | 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), 31 | ], 32 | ], 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/database/factories/PostFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class PostFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'user_id' => 1, 21 | 'title' => fake()->sentence(), 22 | 'body' => fake()->paragraph(20), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/database/migrations/0001_01_01_000001_create_cache_table.php: -------------------------------------------------------------------------------- 1 | string('key')->primary(); 16 | $table->mediumText('value'); 17 | $table->integer('expiration'); 18 | }); 19 | 20 | Schema::create('cache_locks', function (Blueprint $table) { 21 | $table->string('key')->primary(); 22 | $table->string('owner'); 23 | $table->integer('expiration'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('cache'); 33 | Schema::dropIfExists('cache_locks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/database/migrations/2024_04_04_022307_create_posts_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->foreignId('user_id')->constrained()->cascadeOnDelete(); 17 | $table->string('title'); 18 | $table->text('body'); 19 | $table->string('image')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | */ 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('posts'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/database/migrations/2024_05_14_234104_create_subscribers_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('email'); 17 | $table->timestamps(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('subscribers'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 18 | 19 | Post::factory(2)->create(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build" 7 | }, 8 | "devDependencies": { 9 | "autoprefixer": "^10.4.19", 10 | "axios": "^1.6.4", 11 | "laravel-vite-plugin": "^1.0", 12 | "postcss": "^8.4.38", 13 | "tailwindcss": "^3.4.3", 14 | "vite": "^5.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Web developer path videos/Laravel/Laravel_11/my_app/public/favicon.ico -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/public/index.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 18 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | window.axios = axios; 3 | 4 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 5 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/views/auth/forgot-password.blade.php: -------------------------------------------------------------------------------- 1 | 2 |

Request a password reset email

3 | 4 | {{-- Session Messages --}} 5 | @if (session('status')) 6 | 7 | @endif 8 | 9 |
10 | 11 | @csrf 12 | 13 | {{-- Email --}} 14 |
15 | 16 | 18 | 19 | @error('email') 20 |

{{ $message }}

21 | @enderror 22 |
23 | 24 | {{-- Submit Button --}} 25 | 26 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/views/auth/verify-email.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | {{-- Session Messages --}} 6 | @if (session('message')) 7 | 8 | @endif 9 | 10 |

Please verify your email through the email we've sent you.

11 | 12 |

Didn't get the email?

13 |
14 | @csrf 15 | 16 | 17 |
18 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/views/components/flashMsg.blade.php: -------------------------------------------------------------------------------- 1 | @props(['msg', 'bg' => 'bg-green-500' ]) 2 | 3 |

{{ $msg }}

-------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/views/emails/welcome.blade.php: -------------------------------------------------------------------------------- 1 |

Hello {{ $user->username }}

2 | 3 |
4 |

You created {{ $post->title }}

5 |

{{ $post->body }}

6 | 7 | 8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/views/posts/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 |

Latest Posts

3 | 4 | {{-- List of posts --}} 5 |
6 | @foreach ($posts as $post) 7 | 8 | @endforeach 9 |
10 | 11 | {{-- Pagination links --}} 12 |
13 | {{ $posts->links() }} 14 |
15 |
16 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/views/posts/show.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/resources/views/users/posts.blade.php: -------------------------------------------------------------------------------- 1 | 2 | {{-- Heading --}} 3 |

{{ $user->username }}'s Posts ♦ {{ $posts->total() }}

4 | 5 | {{-- User's posts --}} 6 |
7 | @foreach ($posts as $post) 8 | 9 | @endforeach 10 |
11 | 12 | {{-- Pagination links --}} 13 |
14 | {{ $posts->links() }} 15 |
16 |
17 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote')->hourly(); 9 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./resources/**/*.blade.php", 5 | "./resources/**/*.js", 6 | "./resources/**/*.vue", 7 | "./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php", 8 | ], 9 | theme: { 10 | extend: {}, 11 | }, 12 | plugins: [], 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 5 | 6 | $response->assertStatus(200); 7 | }); 8 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | toBeTrue(); 5 | }); 6 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/Laravel_11/my_app/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | laravel({ 7 | input: ['resources/css/app.css', 'resources/js/app.js'], 8 | refresh: true, 9 | }), 10 | ], 11 | }); 12 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/README.md: -------------------------------------------------------------------------------- 1 | ### [Laravel 10 part 1](https://youtu.be/9P2w-n1fPqc) 2 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpunit.result.cache 12 | Homestead.json 13 | Homestead.yaml 14 | auth.json 15 | npm-debug.log 16 | yarn-error.log 17 | /.fleet 18 | /.idea 19 | /.vscode 20 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 16 | } 17 | 18 | /** 19 | * Register the commands for the application. 20 | */ 21 | protected function commands(): void 22 | { 23 | $this->load(__DIR__.'/Commands'); 24 | 25 | require base_path('routes/console.php'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $dontFlash = [ 16 | 'current_password', 17 | 'password', 18 | 'password_confirmation', 19 | ]; 20 | 21 | /** 22 | * Register the exception handling callbacks for the application. 23 | */ 24 | public function register(): void 25 | { 26 | $this->reportable(function (Throwable $e) { 27 | // 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | validate($request, [ 20 | 'email' => ['email', 'required'], 21 | 'password' => ['required'] 22 | ]); 23 | 24 | // login 25 | if (Auth::attempt($credentials, $request->remember)) { 26 | return redirect()->intended(); 27 | } else { 28 | return back()->withErrors([ 29 | 'failed' => 'Incorrect credentials!' 30 | ]); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Controllers/Auth/LogoutController.php: -------------------------------------------------------------------------------- 1 | session()->invalidate(); 16 | 17 | $request->session()->regenerateToken(); 18 | 19 | return redirect()->route('home'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | validate($request, [ 22 | 'username' => ['required', 'max:255'], 23 | 'email' => ['required', 'email', 'max:255', 'unique:users'], 24 | 'password' => ['required', 'confirmed', 'min:3'] 25 | ]); 26 | 27 | // register 28 | $user = User::create([ 29 | 'username' => $request->username, 30 | 'email' => $request->email, 31 | 'password' => Hash::make($request->password) 32 | ]); 33 | 34 | // login 35 | Auth::login($user); 36 | 37 | // redirect 38 | return redirect()->route('home'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | expectsJson() ? null : route('login'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 24 | return redirect(RouteServiceProvider::HOME); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts(): array 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Models/User.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | protected $fillable = [ 21 | 'username', 22 | 'email', 23 | 'password', 24 | ]; 25 | 26 | /** 27 | * The attributes that should be hidden for serialization. 28 | * 29 | * @var array 30 | */ 31 | protected $hidden = [ 32 | 'password', 33 | 'remember_token', 34 | ]; 35 | 36 | /** 37 | * The attributes that should be cast. 38 | * 39 | * @var array 40 | */ 41 | protected $casts = [ 42 | 'email_verified_at' => 'datetime', 43 | 'password' => 'hashed', 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $policies = [ 16 | // 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | */ 22 | public function boot(): void 23 | { 24 | // 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | > 16 | */ 17 | protected $listen = [ 18 | Registered::class => [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | */ 26 | public function boot(): void 27 | { 28 | // 29 | } 30 | 31 | /** 32 | * Determine if events and listeners should be automatically discovered. 33 | */ 34 | public function shouldDiscoverEvents(): bool 35 | { 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/config/cors.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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('username'); 17 | $table->string('email')->unique(); 18 | $table->timestamp('email_verified_at')->nullable(); 19 | $table->string('password'); 20 | $table->rememberToken(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('users'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php: -------------------------------------------------------------------------------- 1 | string('email')->primary(); 16 | $table->string('token'); 17 | $table->timestamp('created_at')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('password_reset_tokens'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('uuid')->unique(); 17 | $table->text('connection'); 18 | $table->text('queue'); 19 | $table->longText('payload'); 20 | $table->longText('exception'); 21 | $table->timestamp('failed_at')->useCurrent(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('failed_jobs'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->morphs('tokenable'); 17 | $table->string('name'); 18 | $table->string('token', 64)->unique(); 19 | $table->text('abilities')->nullable(); 20 | $table->timestamp('last_used_at')->nullable(); 21 | $table->timestamp('expires_at')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('personal_access_tokens'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | // \App\Models\User::factory()->create([ 18 | // 'name' => 'Test User', 19 | // 'email' => 'test@example.com', 20 | // ]); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build" 7 | }, 8 | "devDependencies": { 9 | "autoprefixer": "^10.4.18", 10 | "axios": "^1.6.4", 11 | "laravel-vite-plugin": "^1.0.0", 12 | "postcss": "^8.4.35", 13 | "tailwindcss": "^3.4.1", 14 | "vite": "^5.0.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Web developer path videos/Laravel/part_one/public/favicon.ico -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/resources/css/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer components { 6 | .nav-link { 7 | @apply px-3 py-1 rounded-md hover:bg-indigo-600 grid place-items-center; 8 | } 9 | .card { 10 | @apply bg-white px-6 py-10 rounded-lg shadow-lg; 11 | } 12 | .title { 13 | @apply font-bold mb-8 text-2xl; 14 | } 15 | .input { 16 | @apply block w-full rounded-md p-2 placeholder:text-sm border-0 outline-0 ring-1 ring-indigo-500 focus:ring-2; 17 | } 18 | .btn { 19 | @apply block w-full bg-indigo-500 text-white rounded-md p-2 active:bg-indigo-600; 20 | } 21 | .error { 22 | @apply text-sm text-red-500; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/resources/views/dashboard.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.main') 2 | 3 | @section('content') 4 |

Welcome {{ auth()->user()->username }}

5 | @endsection 6 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.main') 2 | 3 | @section('content') 4 |

Welcome user

5 | @endsection 6 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/routes/web.php: -------------------------------------------------------------------------------- 1 | name('home'); 10 | 11 | Route::middleware('guest')->group(function () { 12 | Route::get('/register', [RegisterController::class, 'index'])->name('register'); 13 | Route::post('/register', [RegisterController::class, 'create']); 14 | 15 | Route::get('/login', [LoginController::class, 'index'])->name('login'); 16 | Route::post('/login', [LoginController::class, 'login']); 17 | }); 18 | 19 | Route::middleware('auth')->group(function () { 20 | Route::post('/logout', [LogoutController::class, 'logout'])->name('logout'); 21 | Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard'); 22 | }); 23 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/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 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./resources/**/*.blade.php", 5 | "./resources/**/*.js", 6 | "./resources/**/*.vue", 7 | ], 8 | theme: { 9 | extend: {}, 10 | }, 11 | plugins: [], 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 18 | 19 | return $app; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Web developer path videos/Laravel/part_one/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | laravel({ 7 | input: ['resources/css/app.css', 'resources/js/app.js'], 8 | refresh: true, 9 | }), 10 | ], 11 | }); 12 | -------------------------------------------------------------------------------- /Web developer path videos/PHP_full/OOP_and_PDO/config.php: -------------------------------------------------------------------------------- 1 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 24 | // set the PDO fetch mode to object 25 | $conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); 26 | 27 | /*************** Read from DB ***************/ 28 | $get_q = "SELECT * FROM posts ORDER BY created_at DESC"; 29 | $posts = $conn->query($get_q); // returns a PDOStatement 30 | 31 | // Get data as associative array, and override the PDO default fetch mode 32 | $posts->fetchAll(PDO::FETCH_ASSOC); 33 | } catch (PDOException $e) { 34 | echo "Connection failed: " . $e->getMessage(); 35 | } 36 | -------------------------------------------------------------------------------- /Web developer path videos/PHP_full/superglobals_and_forms/config/db_config.php: -------------------------------------------------------------------------------- 1 | getMessage(); 14 | } 15 | 16 | // OOP 17 | // try { 18 | // $conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); 19 | // } catch (Exception $e) { 20 | // echo $e->getMessage(); 21 | // } 22 | -------------------------------------------------------------------------------- /Web developer path videos/PHP_full/superglobals_and_forms/file_upload.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
30 | 31 | -------------------------------------------------------------------------------- /Web developer path videos/PHP_full/superglobals_and_forms/index.php: -------------------------------------------------------------------------------- 1 | query($q); 10 | // if($conn->num_rows > 0){} 11 | 12 | ?> 13 | 14 | 15 |
16 |

Latest Posts

17 | 18 | 19 | 20 |
21 |

22 | 23 |

24 | 25 | posted on: 26 | 27 |

28 | 29 |

30 |
31 | 32 | 33 | 34 |
35 | 36 | -------------------------------------------------------------------------------- /Web developer path videos/PHP_full/superglobals_and_forms/layouts/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Web developer path videos/PHP_full/superglobals_and_forms/layouts/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Document 12 | 13 | 14 | 15 |
16 | 21 |
22 |
-------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-prettier/skip-formatting' 10 | ], 11 | parserOptions: { 12 | ecmaVersion: 'latest' 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/prettierrc", 3 | "semi": false, 4 | "tabWidth": 2, 5 | "singleQuote": true, 6 | "printWidth": 100, 7 | "trailingComma": "none" 8 | } -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "Vue.volar", 4 | "Vue.vscode-typescript-vue-plugin", 5 | "dbaeumer.vscode-eslint", 6 | "esbenp.prettier-vscode" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/README.MD: -------------------------------------------------------------------------------- 1 | # blog-vue 👉 https://www.youtube.com/watch?v=WSh8iiWgOLg 2 | 3 | ## Recommended IDE Setup 4 | 5 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). 6 | 7 | ## Customize configuration 8 | 9 | See [Vite Configuration Reference](https://vitejs.dev/config/). 10 | 11 | ## Project Setup 12 | 13 | ```sh 14 | npm install 15 | ``` 16 | 17 | ### Compile and Hot-Reload for Development 18 | 19 | ```sh 20 | npm run dev 21 | ``` 22 | 23 | ### Compile and Minify for Production 24 | 25 | ```sh 26 | npm run build 27 | ``` 28 | 29 | ### Lint with [ESLint](https://eslint.org/) 30 | 31 | ```sh 32 | npm run lint 33 | ``` 34 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "posts": [ 3 | { 4 | "id": 1, 5 | "title": "This great book!", 6 | "body": "tellus integer feugiat scelerisque varius morbi enim nunc faucibus a pellentesque sit", 7 | "author": "Sarah Doe", 8 | "created_at": "11/06/2023", 9 | "is_saved": false 10 | }, 11 | { 12 | "id": 2, 13 | "title": "Coding is fun!?", 14 | "body": "tellus integer feugiat scelerisque varius morbi enim nunc faucibus a pellentesque sit", 15 | "author": "Jon Doe", 16 | "created_at": "06/04/2023", 17 | "is_saved": false 18 | }, 19 | { 20 | "id": 3, 21 | "title": "Vue js VS React", 22 | "body": "tellus integer feugiat scelerisque varius morbi enim nunc faucibus a pellentesque sit", 23 | "author": "Jon Doe", 24 | "created_at": "12/30/2022", 25 | "is_saved": false 26 | }, 27 | { 28 | "id": 4, 29 | "title": "Video games", 30 | "body": "tellus integer feugiat scelerisque varius morbi enim nunc faucibus a pellentesque sit", 31 | "author": "Jon Doe", 32 | "created_at": "05/01/2023", 33 | "is_saved": false 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blog-vue", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview", 9 | "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore", 10 | "format": "prettier --write src/" 11 | }, 12 | "dependencies": { 13 | "pinia": "^2.1.7", 14 | "vue": "^3.3.4", 15 | "vue-router": "^4.2.5" 16 | }, 17 | "devDependencies": { 18 | "@rushstack/eslint-patch": "^1.3.3", 19 | "@vitejs/plugin-vue": "^4.4.0", 20 | "@vue/eslint-config-prettier": "^8.0.0", 21 | "eslint": "^8.49.0", 22 | "eslint-plugin-vue": "^9.17.0", 23 | "prettier": "^3.0.3", 24 | "sass": "^1.69.5", 25 | "vite": "^4.4.11" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 17 | 18 | 35 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/src/assets/main.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Kanit:wght@100;200;300;400;500;600&display=swap'); 2 | 3 | * { 4 | padding: 0; 5 | margin: 0; 6 | box-sizing: border-box; 7 | text-decoration: none; 8 | font-family: 'Kanit', sans-serif; 9 | } 10 | 11 | body { 12 | color: #212121; 13 | background: #f3eeea; 14 | } 15 | 16 | button { 17 | cursor: pointer; 18 | font-weight: inherit; 19 | color: inherit; 20 | font-size: inherit; 21 | border: none; 22 | outline: none; 23 | background: none; 24 | } 25 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/src/components/MyWrapper.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/src/main.js: -------------------------------------------------------------------------------- 1 | import './assets/main.css' 2 | 3 | import { createApp } from 'vue' 4 | import { createPinia } from 'pinia' 5 | 6 | import App from './App.vue' 7 | import router from './router' 8 | 9 | const app = createApp(App) 10 | 11 | app.use(createPinia()) 12 | app.use(router) 13 | 14 | app.mount('#app') 15 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router' 2 | import HomeView from '@/views/HomeView.vue' 3 | import PostCreate from '@/views/PostCreate.vue' 4 | 5 | const router = createRouter({ 6 | history: createWebHistory(import.meta.env.BASE_URL), 7 | routes: [ 8 | { 9 | path: '/', 10 | name: 'home', 11 | component: HomeView 12 | }, 13 | { 14 | path: '/post-create', 15 | name: 'post-create', 16 | component: PostCreate 17 | } 18 | ] 19 | }) 20 | 21 | export default router 22 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_composition_api/vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from 'node:url' 2 | 3 | import { defineConfig } from 'vite' 4 | import vue from '@vitejs/plugin-vue' 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [ 9 | vue(), 10 | ], 11 | resolve: { 12 | alias: { 13 | '@': fileURLToPath(new URL('./src', import.meta.url)) 14 | } 15 | } 16 | }) 17 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_options_api/App.js: -------------------------------------------------------------------------------- 1 | import UserList from "./UserList.js"; 2 | import UserCreate from "./UserCreate.js"; 3 | import TheWatcher from "./TheWatcher.js"; 4 | 5 | const { createApp } = Vue; 6 | 7 | createApp({ 8 | components: { UserList, UserCreate, TheWatcher }, 9 | data() { 10 | return { 11 | users: [], 12 | }; 13 | }, 14 | methods: { 15 | add(user) { 16 | this.users.push({ 17 | username: user.username, 18 | email: user.email, 19 | membership: user.membership, 20 | }) 21 | } 22 | }, 23 | }).mount("#app"); 24 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_options_api/TheWatcher.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | password: "", 5 | isPasswordValid: false, 6 | }; 7 | }, 8 | watch: { 9 | password(newPass, oldPass) { 10 | this.isPasswordValid = 11 | /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{4,}$/.test(newPass); 12 | }, 13 | }, 14 | template: `
15 |

The Watcher

16 | Password 17 | 24 | * Password must contain at least one number and a symbol 25 |
`, 26 | }; 27 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_options_api/UserList.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | users: Array, 4 | }, 5 | template: `
6 |

Users List

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 |
UsernameEmailMembership
{{ user.username }}{{ user.email }}{{ user.membership }}
23 |

Please add a user

24 |
`, 25 | }; 26 | -------------------------------------------------------------------------------- /Web developer path videos/Vue_options_api/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vue.js 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 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 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 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 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpunit.result.cache 12 | Homestead.json 13 | Homestead.yaml 14 | auth.json 15 | npm-debug.log 16 | yarn-error.log 17 | /.fleet 18 | /.idea 19 | /.vscode 20 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | User::when($request->search, function ($query) use ($request) { 15 | $query 16 | ->where('name', 'like', '%' . $request->search . '%') 17 | ->orWhere('email', 'like', '%' . $request->search . '%'); 18 | })->paginate(5)->withQueryString(), 19 | 20 | 'searchTerm' => $request->search, 21 | 22 | 'can' => [ 23 | 'delete_user' => 24 | Auth::user() ? 25 | Auth::user()->can('delete', User::class) : 26 | null 27 | ] 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/app/Policies/UserPolicy.php: -------------------------------------------------------------------------------- 1 | email === 'jon@email.com'; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | handleCommand(new ArgvInput); 14 | 15 | exit($status); 16 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/bootstrap/app.php: -------------------------------------------------------------------------------- 1 | withRouting( 10 | web: __DIR__.'/../routes/web.php', 11 | commands: __DIR__.'/../routes/console.php', 12 | health: '/up', 13 | ) 14 | ->withMiddleware(function (Middleware $middleware) { 15 | $middleware->web(append: [ 16 | HandleInertiaRequests::class 17 | ]); 18 | }) 19 | ->withExceptions(function (Exceptions $exceptions) { 20 | // 21 | })->create(); 22 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'token' => env('POSTMARK_TOKEN'), 19 | ], 20 | 21 | 'ses' => [ 22 | 'key' => env('AWS_ACCESS_KEY_ID'), 23 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 24 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 25 | ], 26 | 27 | 'slack' => [ 28 | 'notifications' => [ 29 | 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), 30 | 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), 31 | ], 32 | ], 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/database/migrations/0001_01_01_000001_create_cache_table.php: -------------------------------------------------------------------------------- 1 | string('key')->primary(); 16 | $table->mediumText('value'); 17 | $table->integer('expiration'); 18 | }); 19 | 20 | Schema::create('cache_locks', function (Blueprint $table) { 21 | $table->string('key')->primary(); 22 | $table->string('owner'); 23 | $table->integer('expiration'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('cache'); 33 | Schema::dropIfExists('cache_locks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build" 7 | }, 8 | "devDependencies": { 9 | "autoprefixer": "^10.4.19", 10 | "axios": "^1.6.4", 11 | "laravel-vite-plugin": "^1.0", 12 | "postcss": "^8.4.38", 13 | "tailwindcss": "^3.4.3", 14 | "vite": "^5.0" 15 | }, 16 | "dependencies": { 17 | "@inertiajs/vue3": "^1.0.16", 18 | "@vitejs/plugin-vue": "^5.0.4", 19 | "lodash": "^4.17.21", 20 | "vue": "^3.4.25" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/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 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonVadar/YouTube_videos/90ce0b9a55f854dc49170eebaea1357cb5d4d235/Web developer path videos/laravel_Inertia_Vue/public/favicon.ico -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/public/index.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 18 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/resources/js/Pages/Components/TextInput.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 27 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/resources/js/Pages/Dashboard.vue: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/resources/js/app.js: -------------------------------------------------------------------------------- 1 | import "./bootstrap"; 2 | import "../css/app.css"; 3 | 4 | import { createApp, h } from "vue"; 5 | import { createInertiaApp, Head, Link } from "@inertiajs/vue3"; 6 | import { ZiggyVue } from '../../vendor/tightenco/ziggy' 7 | import Layout from "./Layouts/Layout.vue"; 8 | 9 | createInertiaApp({ 10 | title: (title) => `My App ${title}`, 11 | resolve: (name) => { 12 | const pages = import.meta.glob("./Pages/**/*.vue", { eager: true }); 13 | let page = pages[`./Pages/${name}.vue`]; 14 | page.default.layout = page.default.layout || Layout; 15 | return page; 16 | }, 17 | setup({ el, App, props, plugin }) { 18 | createApp({ render: () => h(App, props) }) 19 | .use(plugin) 20 | .use(ZiggyVue) 21 | .component("Head", Head) 22 | .component("Link", Link) 23 | .mount(el); 24 | }, 25 | progress: { 26 | color: "#fff", 27 | includeCSS: true, 28 | showSpinner: true, 29 | }, 30 | }); 31 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | window.axios = axios; 3 | 4 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 5 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/resources/views/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @vite('resources/js/app.js') 8 | @inertiaHead 9 | @routes 10 | 11 | 12 | @inertia 13 | 14 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote')->hourly(); 9 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/routes/web.php: -------------------------------------------------------------------------------- 1 | name('home'); 8 | 9 | Route::middleware('auth')->group(function () { 10 | Route::inertia('/dashboard', 'Dashboard')->name('dashboard'); 11 | 12 | Route::post('/logout', [AuthController::class, 'logout'])->name('logout'); 13 | }); 14 | 15 | Route::middleware('guest')->group(function () { 16 | Route::inertia('/register', 'Auth/Register')->name('register'); 17 | Route::post('/register', [AuthController::class, 'register']); 18 | 19 | Route::inertia('/login', 'Auth/Login')->name('login'); 20 | Route::post('/login', [AuthController::class, 'login']); 21 | }); 22 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/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 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./resources/**/*.blade.php", 5 | "./resources/**/*.js", 6 | "./resources/**/*.vue", 7 | ], 8 | theme: { 9 | extend: {}, 10 | }, 11 | plugins: [], 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 5 | 6 | $response->assertStatus(200); 7 | }); 8 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | toBeTrue(); 5 | }); 6 | -------------------------------------------------------------------------------- /Web developer path videos/laravel_Inertia_Vue/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | import vue from '@vitejs/plugin-vue' 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | vue(), 8 | laravel({ 9 | input: ['resources/css/app.css', 'resources/js/app.js'], 10 | refresh: true, 11 | }), 12 | ], 13 | }); 14 | --------------------------------------------------------------------------------