title
Laravel PHP Framework Tutorial - Full Course for Beginners (2019)
description
Learn Laravel 5.8 by creating an Instagram clone in this full tutorial course for beginners. Laravel is a free, open-source PHP web framework used for creating web applications.
💻Code: https://github.com/coderstape/freecodegram
⭐️Course Contents ⭐️
⌨️ (0:00) Introduction
⌨️ (1:14) What is Laravel?
⌨️ (2:07) Installing Laravel
⌨️ (5:30) First look at the project
⌨️ (7:15) Intro to php artisan
⌨️ (11:42) Generating login flow with make:auth
⌨️ (12:04) Setting Up the Front End with Node and NPM
⌨️ (20:00) Migrations and Setting Up SQLite
⌨️ (26:00) Designing the UI from Instagram
⌨️ (42:12) Adding Username to the Registration Flow
⌨️ (58:35) Creating the Profiles Controller
⌨️ (1:04:00) RESTful Resource Controller
⌨️ (1:09:10) Passing Data to the View
⌨️ (1:10:20) Adding the Profiles Mode, Migration and Table
⌨️ (1:17:30) Adding Eloquent Relationships
⌨️ (1:28:10) Fetching the Record From The Database
⌨️ (1:30:00) Adding Posts to the Database & Many To Many Relationship
⌨️ (2:04:24) Creating Through a Relationship
⌨️ (2:08:12) Uploading/Saving the Image to the Project
⌨️ (2:19:19) Resizing Images with Intervention Image PHP Library
⌨️ (2:27:42) Route Model Binding
⌨️ (2:31:48) Editing the Profile
⌨️ (2:46:46) Restricting/Authorizing Actions with a Model Policy
⌨️ (2:54:50) Editing the Profile Image
⌨️ (3:00:00) Automatically Creating A Profile Using Model Events
⌨️ (3:12:56) Default Profile Image
⌨️ (3:19:48) Follow/Unfollow Profiles Using a Vue.js Component
⌨️ (3:31:28) Many To Many Relationship
⌨️ (3:46:33) Calculating Followers Count and Following Count
⌨️ (3:48:55) Laravel Telescope
⌨️ (3:51:44) Showing Posts from Profiles The User Is Following
⌨️ (4:01:03) Pagination with Eloquent
⌨️ (4:03:25) N + 1 Problem & Solution
⌨️ (4:05:21) Make Use of Cache for Expensive Query
⌨️ (4:11:44) Sending Emails to New Registered Users
⌨️ (4:21:51) Wrapping Up
⌨️ (4:22:37) Closing Remarks & What's Next In your Learning
🎥Course from Coder's Tape. Check out their YouTube channel for more great Laravel tutorials: https://www.youtube.com/coderstape
--
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://medium.freecodecamp.org
detail
{'title': 'Laravel PHP Framework Tutorial - Full Course for Beginners (2019)', 'heatmap': [{'end': 6365.764, 'start': 6200.794, 'weight': 1}], 'summary': "Tutorial covers a full laravel course including instagram clone creation with features like following, authentication, and image resizing. it emphasizes laravel's setup, web development techniques, model creation, instagram post link functionality, security measures, user profile management, styling, vue integration for follow functionality, and performance optimization.", 'chapters': [{'end': 67.762, 'segs': [{'end': 67.762, 'src': 'embed', 'start': 0.289, 'weight': 0, 'content': [{'end': 1.29, 'text': 'Welcome, everybody.', 'start': 0.289, 'duration': 1.001}, {'end': 9.077, 'text': "My name is Victor, and we're going to be tackling some Laravel, we're going to do a full course on Laravel from scratch.", 'start': 1.65, 'duration': 7.427}, {'end': 13.06, 'text': "But before we even get to that, I want to show you what we're going to be building.", 'start': 9.557, 'duration': 3.503}, {'end': 16.843, 'text': "So for this project, we're going to be building an Instagram clone.", 'start': 13.461, 'duration': 3.382}, {'end': 19.726, 'text': 'And it looks pretty much just like Instagram.', 'start': 17.264, 'duration': 2.462}, {'end': 26.272, 'text': "So, if we click on a post, we'll be able to follow, we'll be able to unfollow, we'll be able to edit profiles,", 'start': 20.126, 'duration': 6.146}, {'end': 28.834, 'text': "We'll be able to change our profile image.", 'start': 26.932, 'duration': 1.902}, {'end': 33.48, 'text': "We're going to be resizing images from scratch using the intervention library.", 'start': 29.135, 'duration': 4.345}, {'end': 35.463, 'text': "You're also able to add a new post.", 'start': 33.821, 'duration': 1.642}, {'end': 38.727, 'text': 'Of course, you can write your own captions, choose your image.', 'start': 35.603, 'duration': 3.124}, {'end': 43.813, 'text': "We're also able to log out and have users and authentication.", 'start': 39.187, 'duration': 4.626}, {'end': 51.696, 'text': "we're able to register users, including their username, just about everything that Instagram can do, we're going to be able to do.", 'start': 44.173, 'duration': 7.523}, {'end': 56.118, 'text': "And I'm going to show you how to do everything 100% from scratch.", 'start': 52.016, 'duration': 4.102}, {'end': 59.119, 'text': 'So this is going to be a full fledged course.', 'start': 56.558, 'duration': 2.561}, {'end': 60.72, 'text': 'there are no slides here.', 'start': 59.119, 'duration': 1.601}, {'end': 64.881, 'text': "we're going full on board coding with zero breaks.", 'start': 60.72, 'duration': 4.161}, {'end': 67.762, 'text': 'we are going straight through learning every single minute.', 'start': 64.881, 'duration': 2.881}], 'summary': 'Full laravel course building an instagram clone with user authentication and features from scratch.', 'duration': 67.473, 'max_score': 0.289, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE289.jpg'}], 'start': 0.289, 'title': 'Laravel full course', 'summary': 'Will cover a full course on laravel, building an instagram clone with features like following, unfollowing, editing profiles, resizing images, adding new posts, and user authentication, all from scratch with zero breaks.', 'chapters': [{'end': 67.762, 'start': 0.289, 'title': 'Laravel full course: build instagram clone', 'summary': 'Will cover a full course on laravel, building an instagram clone with features like following, unfollowing, editing profiles, resizing images, adding new posts, and user authentication, all from scratch with zero breaks.', 'duration': 67.473, 'highlights': ['Building Instagram clone with features like following, unfollowing, editing profiles, resizing images, adding new posts, and user authentication', 'Learning every single minute with zero breaks', 'Tackling Laravel in a full course from scratch']}], 'duration': 67.473, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE289.jpg', 'highlights': ['Building Instagram clone with features like following, unfollowing, editing profiles, resizing images, adding new posts, and user authentication', 'Tackling Laravel in a full course from scratch', 'Learning every single minute with zero breaks']}, {'end': 1376.026, 'segs': [{'end': 98.353, 'src': 'embed', 'start': 68.103, 'weight': 0, 'content': [{'end': 71.144, 'text': "So if you stick with me, I promise you, I'll make it worth your while.", 'start': 68.103, 'duration': 3.041}, {'end': 74.205, 'text': "and you're going to learn a ton about Laravel.", 'start': 71.664, 'duration': 2.541}, {'end': 82.647, 'text': "So what is Laravel? Well, if you're unfamiliar, Laravel is the fastest growing open source PHP framework to date.", 'start': 74.945, 'duration': 7.702}, {'end': 83.787, 'text': 'As a matter of fact,', 'start': 83.087, 'duration': 0.7}, {'end': 92.65, 'text': 'it is the number one framework in GitHub and it has allowed the community to by far write some of the best PHP applications to date.', 'start': 83.787, 'duration': 8.863}, {'end': 98.353, 'text': 'It is extremely easy on newcomers but it is extremely powerful.', 'start': 93.27, 'duration': 5.083}], 'summary': 'Laravel is the fastest growing php framework, number one on github, easy for newcomers, and powerful.', 'duration': 30.25, 'max_score': 68.103, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE68103.jpg'}, {'end': 167.072, 'src': 'embed', 'start': 136.162, 'weight': 1, 'content': [{'end': 140.544, 'text': 'And now in my terminal, the first thing you need to make sure is that you have composer.', 'start': 136.162, 'duration': 4.382}, {'end': 145.346, 'text': "Composer is a PHP dependency package manager that you're going to need.", 'start': 141.024, 'duration': 4.322}, {'end': 150.568, 'text': 'So composer, PHP, package manager, we can do a quick Google search for it.', 'start': 145.426, 'duration': 5.142}, {'end': 151.569, 'text': 'And there it is.', 'start': 150.968, 'duration': 0.601}, {'end': 154.089, 'text': 'So get composer.org.', 'start': 151.809, 'duration': 2.28}, {'end': 160.81, 'text': 'So if you visit the getting started, I recommend you go ahead and follow the instructions to install it globally.', 'start': 154.629, 'duration': 6.181}, {'end': 167.072, 'text': 'To actually install it, all you actually need to do is run this command right here in your terminal.', 'start': 161.111, 'duration': 5.961}], 'summary': 'Install composer globally by following the instructions on composer.org.', 'duration': 30.91, 'max_score': 136.162, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE136162.jpg'}, {'end': 235.744, 'src': 'embed', 'start': 205.525, 'weight': 2, 'content': [{'end': 208.986, 'text': 'Once you have node installed node also installs npm.', 'start': 205.525, 'duration': 3.461}, {'end': 212.828, 'text': 'And npm is actually the JavaScript counterpart to composer.', 'start': 209.286, 'duration': 3.542}, {'end': 222.112, 'text': 'So we should be able to run node dash V and get a version number and npm dash V and also get a version number.', 'start': 213.468, 'duration': 8.644}, {'end': 227.137, 'text': 'So with that, the last thing we need is that Laravel installer.', 'start': 223.274, 'duration': 3.863}, {'end': 235.744, 'text': 'So if we go into documentation and we scroll down to installing Laravel, now that we have composer, we can run this command.', 'start': 227.618, 'duration': 8.126}], 'summary': 'Node and npm are installed, laravel installer is needed for further steps.', 'duration': 30.219, 'max_score': 205.525, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE205525.jpg'}, {'end': 322.184, 'src': 'embed', 'start': 296.178, 'weight': 3, 'content': [{'end': 301.102, 'text': "So we're going to be going back and forth to this to get exactly what we want out of our page.", 'start': 296.178, 'duration': 4.924}, {'end': 304.744, 'text': "So first and foremost, I'm going to start with this header up here.", 'start': 301.762, 'duration': 2.982}, {'end': 307.226, 'text': "So now let's create a new Laravel project.", 'start': 305.164, 'duration': 2.062}, {'end': 313.213, 'text': 'I will say Laravel, new free code gram.', 'start': 308.467, 'duration': 4.746}, {'end': 315.095, 'text': "That's what our project name is going to be.", 'start': 313.814, 'duration': 1.281}, {'end': 316.477, 'text': "Let's let it do its thing.", 'start': 315.576, 'duration': 0.901}, {'end': 319, 'text': 'And there we go.', 'start': 318.459, 'duration': 0.541}, {'end': 322.184, 'text': 'So we can CD right into free code gram.', 'start': 319.44, 'duration': 2.744}], 'summary': 'Creating a new laravel project named free code gram.', 'duration': 26.006, 'max_score': 296.178, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE296178.jpg'}, {'end': 371.713, 'src': 'embed', 'start': 345.355, 'weight': 13, 'content': [{'end': 351.38, 'text': "And to be honest, over time, this becomes second nature to you and you'll know exactly where to find everything.", 'start': 345.355, 'duration': 6.025}, {'end': 353.581, 'text': "But just don't let that overwhelm you.", 'start': 351.88, 'duration': 1.701}, {'end': 357.504, 'text': 'The first thing I do want to show you, though, is, of course, we have composer.', 'start': 354.022, 'duration': 3.482}, {'end': 361.406, 'text': "But there is this composer dot JSON file that I've spoken about.", 'start': 357.884, 'duration': 3.522}, {'end': 366.59, 'text': 'And this file is the file that would basically hold your projects assets.', 'start': 361.907, 'duration': 4.683}, {'end': 371.713, 'text': 'What I mean by asset, of course, is we do have composer, which is going to be our dependency manager.', 'start': 367.01, 'duration': 4.703}], 'summary': 'Understanding composer and its json file for managing project assets.', 'duration': 26.358, 'max_score': 345.355, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE345355.jpg'}, {'end': 430.808, 'src': 'embed', 'start': 405.742, 'weight': 7, 'content': [{'end': 412.268, 'text': 'Artisan is a command line tool that ships with Laravel that allows you to do a ton of different things with your application.', 'start': 405.742, 'duration': 6.526}, {'end': 419.894, 'text': "As a matter of fact, you can interact with your entire Laravel application through artisan using something called Tinker, we'll get to that.", 'start': 412.468, 'duration': 7.426}, {'end': 426.963, 'text': "But what I want you to notice is throughout the course, you'll see the exact directory that I'm running any command right up here.", 'start': 420.675, 'duration': 6.288}, {'end': 430.808, 'text': 'So always make sure that you are in the correct directory.', 'start': 427.223, 'duration': 3.585}], 'summary': 'Artisan allows interacting with laravel app via command line tool.', 'duration': 25.066, 'max_score': 405.742, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE405742.jpg'}, {'end': 528.011, 'src': 'embed', 'start': 501.046, 'weight': 8, 'content': [{'end': 506.367, 'text': "Well, that's actually quite simple level ships with a built in PHP server that we can use.", 'start': 501.046, 'duration': 5.321}, {'end': 508.027, 'text': 'And it is this command right here.', 'start': 506.727, 'duration': 1.3}, {'end': 516.409, 'text': 'Now to run a PHP artisan command, you will run PHP artisan and then the command name in our case is surf.', 'start': 508.568, 'duration': 7.841}, {'end': 517.63, 'text': "Alright, let's try that now.", 'start': 516.75, 'duration': 0.88}, {'end': 521.631, 'text': "Inside our project, we'll run PHP artisan surf.", 'start': 518.37, 'duration': 3.261}, {'end': 528.011, 'text': 'And now it tells us level development server has been started and it gives you an address.', 'start': 523.168, 'duration': 4.843}], 'summary': "Laravel ships with a built-in php server. running 'php artisan surf' starts the server with an accessible address.", 'duration': 26.965, 'max_score': 501.046, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE501046.jpg'}, {'end': 644.28, 'src': 'embed', 'start': 612.275, 'weight': 5, 'content': [{'end': 614.855, 'text': 'Now we have this welcome that blade that PHP.', 'start': 612.275, 'duration': 2.58}, {'end': 618.997, 'text': "Now that blade syntax, we're going to talk a little bit about blade up front.", 'start': 615.476, 'duration': 3.521}, {'end': 621.896, 'text': 'blade is a rendering template.', 'start': 619.915, 'duration': 1.981}, {'end': 636.766, 'text': 'And what it will allow you to do is be able to throw in snippets of PHP in your views without it feeling like you are hacking away at your views because your views will primarily be composed of HTML markup.', 'start': 622.136, 'duration': 14.63}, {'end': 644.28, 'text': 'there should be no reason why you should ever be computing or fetching database queries or anything like that in your view.', 'start': 636.766, 'duration': 7.514}], 'summary': 'Blade in php allows adding php snippets in views while maintaining html structure.', 'duration': 32.005, 'max_score': 612.275, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE612275.jpg'}, {'end': 696.085, 'src': 'embed', 'start': 664.181, 'weight': 4, 'content': [{'end': 664.682, 'text': 'And there we are.', 'start': 664.181, 'duration': 0.501}, {'end': 668.567, 'text': 'So we are successfully changing that page.', 'start': 665.023, 'duration': 3.544}, {'end': 671.051, 'text': 'Great, I do want to get right to work.', 'start': 669.308, 'duration': 1.743}, {'end': 675.837, 'text': 'But before I do, I need to do one more housekeeping issue.', 'start': 671.391, 'duration': 4.446}, {'end': 682.44, 'text': 'The thing is that Laravel ships with an authentication system that allows you to register users.', 'start': 676.578, 'duration': 5.862}, {'end': 683.841, 'text': 'it allows you to log in users.', 'start': 682.44, 'duration': 1.401}, {'end': 685.842, 'text': 'it keeps track of all your sessions.', 'start': 683.841, 'duration': 2.001}, {'end': 688.042, 'text': 'it does all of this for you out of the box.', 'start': 685.842, 'duration': 2.2}, {'end': 689.723, 'text': 'Now this command.', 'start': 688.543, 'duration': 1.18}, {'end': 696.085, 'text': "even though it's a little early to introduce you to it, we have to run it because it will change your views,", 'start': 689.723, 'duration': 6.362}], 'summary': "Successfully changing page with laravel's authentication system and views", 'duration': 31.904, 'max_score': 664.181, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE664181.jpg'}, {'end': 799.149, 'src': 'embed', 'start': 772.506, 'weight': 6, 'content': [{'end': 777.571, 'text': 'One of the most powerful things about Laravel is that it is a full development framework,', 'start': 772.506, 'duration': 5.065}, {'end': 782.034, 'text': 'meaning it does have opinions about your front end just as much as it does in your back end.', 'start': 777.571, 'duration': 4.463}, {'end': 790.182, 'text': "So Laravel ships with a working implementation of bootstrap, that's Twitter bootstrap, which I'm sure you're familiar with, and view.", 'start': 782.455, 'duration': 7.727}, {'end': 799.149, 'text': 'Now, Vue JS is a very easy to get started JavaScript framework that will allow you to do all of the things that a modern application needs to do.', 'start': 790.502, 'duration': 8.647}], 'summary': 'Laravel includes bootstrap and vue js for full-stack development.', 'duration': 26.643, 'max_score': 772.506, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE772506.jpg'}, {'end': 995.044, 'src': 'embed', 'start': 949.298, 'weight': 10, 'content': [{'end': 956.263, 'text': 'But once you have that installed, and we have this NPM, we actually have some npm commands that we can run.', 'start': 949.298, 'duration': 6.965}, {'end': 962.289, 'text': 'But before we could do that, of course, the same as composer, we need to pull in these dependencies.', 'start': 957.004, 'duration': 5.285}, {'end': 964.732, 'text': "So we're going to say npm install.", 'start': 962.69, 'duration': 2.042}, {'end': 967.074, 'text': 'Now this is going to take a little bit of time.', 'start': 965.272, 'duration': 1.802}, {'end': 969.637, 'text': "So I'll fast forward to when it's done.", 'start': 967.355, 'duration': 2.282}, {'end': 973.361, 'text': "But don't worry, in your machine, it will take a couple of minutes to get started.", 'start': 969.897, 'duration': 3.464}, {'end': 976.216, 'text': "So there it is, that's done.", 'start': 974.775, 'duration': 1.441}, {'end': 983.883, 'text': "So once it's done, npm and front end development is one of those things that you need to compile before you can use.", 'start': 976.797, 'duration': 7.086}, {'end': 988.226, 'text': "So to run a compilation, you're going to run npm run.", 'start': 984.423, 'duration': 3.803}, {'end': 990.428, 'text': 'And then we have a couple of different options.', 'start': 988.246, 'duration': 2.182}, {'end': 992.71, 'text': "The first one I'm going to run is just dev.", 'start': 990.908, 'duration': 1.802}, {'end': 995.044, 'text': 'So npm run def.', 'start': 993.243, 'duration': 1.801}], 'summary': 'Installing npm dependencies takes a couple of minutes, then run npm run dev for front end development.', 'duration': 45.746, 'max_score': 949.298, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE949298.jpg'}, {'end': 1256.624, 'src': 'embed', 'start': 1224.176, 'weight': 9, 'content': [{'end': 1226.517, 'text': 'Now this is a little bit of a higher concept,', 'start': 1224.176, 'duration': 2.341}, {'end': 1234.039, 'text': 'But just think of a migration as a file that holds all the instructions that you need to tell your database to create itself.', 'start': 1226.997, 'duration': 7.042}, {'end': 1242.12, 'text': "And so throughout this project, we're going to modify the database, but through the migration, not directly into the database.", 'start': 1234.479, 'duration': 7.641}, {'end': 1246.081, 'text': 'Now, why would you do it this way? Well, the answer is fairly simple.', 'start': 1242.64, 'duration': 3.441}, {'end': 1250.682, 'text': 'It describes each change in a very systematic way.', 'start': 1246.721, 'duration': 3.961}, {'end': 1256.624, 'text': 'You know, if you were to just go into your database and make some changes Unless you document those very,', 'start': 1250.982, 'duration': 5.642}], 'summary': 'Migration files hold instructions for systematic database modification.', 'duration': 32.448, 'max_score': 1224.176, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE1224176.jpg'}, {'end': 1313.646, 'src': 'embed', 'start': 1288.514, 'weight': 12, 'content': [{'end': 1294.737, 'text': "So I'm going to be using SQLite for this project, just because of how easy it is to actually set one up.", 'start': 1288.514, 'duration': 6.223}, {'end': 1300.66, 'text': 'So I need to create a file right and this file is basically going to be a flat file database file.', 'start': 1295.237, 'duration': 5.423}, {'end': 1302, 'text': "That's how SQLite works.", 'start': 1300.72, 'duration': 1.28}, {'end': 1305.342, 'text': "So to do that, now if you're on a Mac, you can use touch.", 'start': 1302.4, 'duration': 2.942}, {'end': 1309.504, 'text': "However, just to keep it compatible with Windows, let's run vim.", 'start': 1305.942, 'duration': 3.562}, {'end': 1313.646, 'text': "And then let's create a new file inside the database directory.", 'start': 1310.064, 'duration': 3.582}], 'summary': 'Sqlite chosen for project due to ease of setup and compatibility with windows. creating flat file database file using vim.', 'duration': 25.132, 'max_score': 1288.514, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE1288514.jpg'}], 'start': 68.103, 'title': 'Laravel development and setup', 'summary': 'Covers the installation of laravel using various tools, the step-by-step guide for project setup, front-end development with blade templates, authentication, and integration of front-end technologies, emphasizing its status as the fastest growing open-source php framework and number one framework in github.', 'chapters': [{'end': 274.465, 'start': 68.103, 'title': 'Installing laravel: a quick guide', 'summary': 'Covers the installation of laravel using the laravel installer, composer, and node.js, emphasizing its ease for newcomers and its power for enterprise projects, while highlighting its status as the fastest growing open-source php framework and number one framework in github.', 'duration': 206.362, 'highlights': ['Laravel is the fastest growing open-source PHP framework, number one framework in GitHub, and suitable for small to enterprise projects.', 'Composer is a PHP dependency package manager required for installing Laravel.', 'Node.js is needed for installing Laravel and comes with npm, the JavaScript counterpart to composer.']}, {'end': 589.335, 'start': 274.865, 'title': 'Laravel project setup and development', 'summary': 'Provides a step-by-step guide on setting up a laravel project, showcasing the use of artisan commands and the built-in php server, emphasizing the importance of efficient development and navigation through project files and directories.', 'duration': 314.47, 'highlights': ["The chapter begins with setting up a new Laravel project named 'free code gram' using the command 'Laravel new free code gram'.", "Emphasizes the use of 'artisan', a command line tool that ships with Laravel, to execute various commands for the application.", "Demonstrates the use of the built-in PHP server in Laravel by using the 'PHP artisan serve' command to start the development server.", 'Stresses the significance of efficient development and navigation through project files and directories, reassuring the audience that familiarity comes with time.']}, {'end': 904.701, 'start': 589.795, 'title': 'Laravel front-end development', 'summary': "Highlights the usage of blade templates, laravel's authentication system, and the integration of front-end technologies like vue.js and bootstrap into the laravel framework, emphasizing the importance of separating front-end and back-end functionalities.", 'duration': 314.906, 'highlights': ["Laravel's authentication system allows for user registration, login, and session management out of the box, demonstrated by running the command 'PHP artisan make auth', resulting in the addition of authentication-related files and features to the project.", 'The usage of Blade templates in Laravel simplifies the integration of PHP snippets into HTML views, maintaining the primary composition of HTML markup and emphasizing the separation of concerns between views and controllers.', 'Laravel integrates front-end technologies like Vue.js and Bootstrap, providing a full development framework with opinions about front-end and back-end functionalities, while also allowing for flexibility to switch to other front-end frameworks such as React or jQuery.']}, {'end': 1376.026, 'start': 905.161, 'title': 'Setting up node.js and npm for front-end development', 'summary': 'Discusses setting up node.js and npm to compile front-end assets, including running commands like npm install and npm run dev to ensure efficient front-end asset compilation and deployment, emphasizing the benefits of using migrations for systematic database management and the ease of setting up sqlite for laravel projects.', 'duration': 470.865, 'highlights': ['Setting up Node.js and NPM', 'Running npm commands for front-end asset compilation', 'Benefits of using migrations for systematic database management', 'Setting up SQLite for Laravel projects']}], 'duration': 1307.923, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE68103.jpg', 'highlights': ['Laravel is the fastest growing open-source PHP framework, number one framework in GitHub, and suitable for small to enterprise projects.', 'Composer is a PHP dependency package manager required for installing Laravel.', 'Node.js is needed for installing Laravel and comes with npm, the JavaScript counterpart to composer.', "The chapter begins with setting up a new Laravel project named 'free code gram' using the command 'Laravel new free code gram'.", "Laravel's authentication system allows for user registration, login, and session management out of the box, demonstrated by running the command 'PHP artisan make auth', resulting in the addition of authentication-related files and features to the project.", 'The usage of Blade templates in Laravel simplifies the integration of PHP snippets into HTML views, maintaining the primary composition of HTML markup and emphasizing the separation of concerns between views and controllers.', 'Laravel integrates front-end technologies like Vue.js and Bootstrap, providing a full development framework with opinions about front-end and back-end functionalities, while also allowing for flexibility to switch to other front-end frameworks such as React or jQuery.', "Emphasizes the use of 'artisan', a command line tool that ships with Laravel, to execute various commands for the application.", "Demonstrates the use of the built-in PHP server in Laravel by using the 'PHP artisan serve' command to start the development server.", 'Benefits of using migrations for systematic database management', 'Setting up Node.js and NPM', 'Running npm commands for front-end asset compilation', 'Setting up SQLite for Laravel projects', 'Stresses the significance of efficient development and navigation through project files and directories, reassuring the audience that familiarity comes with time.']}, {'end': 2781.966, 'segs': [{'end': 1437.878, 'src': 'embed', 'start': 1402.622, 'weight': 0, 'content': [{'end': 1404.323, 'text': "And now let's talk about this migration thing.", 'start': 1402.622, 'duration': 1.701}, {'end': 1410.909, 'text': 'So how do we actually get the database migrated, meaning how do we get it to the latest state possible.', 'start': 1404.363, 'duration': 6.546}, {'end': 1414.552, 'text': "But with that, of course, we're going to use a PHP artisan command.", 'start': 1411.509, 'duration': 3.043}, {'end': 1418.735, 'text': "So let's run that now, PHP artisan, migrate.", 'start': 1414.992, 'duration': 3.743}, {'end': 1426.441, 'text': "And if you did everything right, you're going to see that all of a sudden, we created a users table, and a passwords resets table.", 'start': 1420.276, 'duration': 6.165}, {'end': 1430.645, 'text': "Of course, the users table is the one that's going to hold users in our application.", 'start': 1427.002, 'duration': 3.643}, {'end': 1437.878, 'text': 'and our passwords table is a table that will hold any password resets, meaning when somebody forgets their password,', 'start': 1431.394, 'duration': 6.484}], 'summary': 'Migrate database using php artisan command to create users and passwords reset tables.', 'duration': 35.256, 'max_score': 1402.622, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE1402622.jpg'}, {'end': 1825.477, 'src': 'embed', 'start': 1796.109, 'weight': 1, 'content': [{'end': 1797.831, 'text': 'So we have our navigation.', 'start': 1796.109, 'duration': 1.722}, {'end': 1803.756, 'text': 'Now right away, you do notice bootstrap is a little bit wider than the actual Instagram layout.', 'start': 1798.591, 'duration': 5.165}, {'end': 1804.557, 'text': "But that's okay.", 'start': 1803.877, 'duration': 0.68}, {'end': 1806.359, 'text': "We're not trying to replicate the front end.", 'start': 1804.637, 'duration': 1.722}, {'end': 1808.441, 'text': "We're trying to replicate the functionality.", 'start': 1806.699, 'duration': 1.742}, {'end': 1810.143, 'text': "So I'm not too worried about that.", 'start': 1808.981, 'duration': 1.162}, {'end': 1819.672, 'text': 'Now, one thing you do notice here, though, is that if we actually look at where this is lined up, free code gram is almost too high, right?', 'start': 1810.523, 'duration': 9.149}, {'end': 1822.014, 'text': 'It kind of needs to be a little bit lower.', 'start': 1819.692, 'duration': 2.322}, {'end': 1825.477, 'text': 'So yeah, that is not quite lined up exactly how we would want.', 'start': 1822.274, 'duration': 3.203}], 'summary': 'Bootstrap navigation wider than instagram layout, free code gram not aligned as desired.', 'duration': 29.368, 'max_score': 1796.109, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE1796109.jpg'}, {'end': 2160.377, 'src': 'embed', 'start': 2134.072, 'weight': 2, 'content': [{'end': 2138.716, 'text': 'So how do we bring in fonts, obviously, as you see here level is using the Google API fonts.', 'start': 2134.072, 'duration': 4.644}, {'end': 2141.239, 'text': "So how do we get those fonts, let's go back to Chrome.", 'start': 2139.097, 'duration': 2.142}, {'end': 2144.222, 'text': "And let's go to fonts.google.com.", 'start': 2141.919, 'duration': 2.303}, {'end': 2146.747, 'text': 'So there we go.', 'start': 2146.127, 'duration': 0.62}, {'end': 2150.27, 'text': 'Now, Open Sans is a pretty common one.', 'start': 2147.408, 'duration': 2.862}, {'end': 2152.331, 'text': 'And this is actually the one that I do want to use.', 'start': 2150.45, 'duration': 1.881}, {'end': 2160.377, 'text': 'So how do we pull in this font? Well, the first thing we need to do is we need to click this button up here that says select this font.', 'start': 2152.992, 'duration': 7.385}], 'summary': 'Using google fonts api to add open sans font to the website.', 'duration': 26.305, 'max_score': 2134.072, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE2134072.jpg'}, {'end': 2669.722, 'src': 'embed', 'start': 2640.329, 'weight': 3, 'content': [{'end': 2641.87, 'text': 'So that way it actually says username.', 'start': 2640.329, 'duration': 1.541}, {'end': 2642.651, 'text': 'There we go.', 'start': 2642.271, 'duration': 0.38}, {'end': 2646.233, 'text': 'So we have username, and then we have this field here.', 'start': 2643.111, 'duration': 3.122}, {'end': 2651.656, 'text': 'So Ignore a little bit of this for now, but we are able to get errors.', 'start': 2646.774, 'duration': 4.882}, {'end': 2658.158, 'text': 'What do we mean by errors? Well, if the user hits register, and of course, it is doing the HTML validation.', 'start': 2652.196, 'duration': 5.962}, {'end': 2662.079, 'text': "Let's get rid of that just for a second just to show you what it actually does.", 'start': 2658.678, 'duration': 3.401}, {'end': 2667.141, 'text': "If you look right here through this input, you're going to find this required attribute.", 'start': 2662.099, 'duration': 5.042}, {'end': 2669.722, 'text': 'So let me actually get rid of all of them.', 'start': 2667.842, 'duration': 1.88}], 'summary': 'Demonstrating username field and error handling in html form', 'duration': 29.393, 'max_score': 2640.329, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE2640329.jpg'}], 'start': 1376.827, 'title': 'Web development techniques', 'summary': 'Covers web development techniques including using sqlite for database management, managing emv file changes and designing a website logo, replicating the instagram layout, and adding fonts and usernames to a web project. it includes processes such as migrating the database, stopping and restarting the server, using flexbox for alignment, and adding fonts and a username field to the registration form.', 'chapters': [{'end': 1473.147, 'start': 1376.827, 'title': 'Using sqlite for database management', 'summary': 'Discusses using sqlite for database management in laravel, including deleting unnecessary db lines, migrating the database using php artisan command, and creating users and password reset tables.', 'duration': 96.32, 'highlights': ['The chapter demonstrates the usage of SQLite for database management in Laravel, including the deletion of unnecessary DB lines and migration of the database using PHP artisan command.', 'It mentions the creation of users and password reset tables, along with the functionality of the password resets table for storing reset requests.', 'The chapter emphasizes the convenience of Laravel in handling password reset functionality, eliminating the need for manual creation.', 'The process of creating a new user in Chrome is briefly discussed as part of the practical demonstration.']}, {'end': 1719.163, 'start': 1474.347, 'title': 'Managing emv file changes and designing website logo', 'summary': 'Discusses the need to stop the server when making changes to the emv file, the process of stopping and restarting the server, and the steps to design and integrate a logo into the website, emphasizing the importance of file organization and server directory structure.', 'duration': 244.816, 'highlights': ['The need to stop the server when making changes to the EMV file', 'Steps to design and integrate a logo into the website', 'Process of stopping and restarting the server']}, {'end': 2109.302, 'start': 1719.223, 'title': 'Instagram layout replication', 'summary': 'Demonstrates replicating the instagram layout functionality, including using flexbox for alignment, adjusting image and text elements, and creating a multi-column section, with detailed guidance on classes and properties.', 'duration': 390.079, 'highlights': ['The chapter demonstrates replicating the Instagram layout functionality, including using flexbox for alignment, adjusting image and text elements, and creating a multi-column section, with detailed guidance on classes and properties.', 'Using flexbox for alignment of elements, resolving issues with stacking, and implementing padding and borders for layout adjustments.', "Guidance on adjusting image properties, including using the 'rounded-circle' class in Bootstrap and applying padding for layout consistency.", 'Detailed explanation of creating a multi-column section, with instructions on nested div structures, text formatting, and implementation of flexbox for alignment.']}, {'end': 2781.966, 'start': 2110.103, 'title': 'Adding fonts and usernames', 'summary': 'Discusses adding fonts to a web project and making changes to the front-end design, including adding a username field to the registration form, highlighting the process of adding fonts and the steps to include a username field in the registration form, emphasizing the importance of separating logic between views and controllers.', 'duration': 671.863, 'highlights': ['The process of adding fonts involves selecting a font from Google API, customizing it to include different weights, importing the font in the app.scss file, and referencing it in the variables file, followed by recompiling the front-end using npm run dev.', 'Modifying the front-end design involves changing the background color to white, creating a new div for a link, adjusting padding, font weight, and link color, adding rows and columns for posts, sourcing and resizing images, and applying padding to create spacing.', 'Incorporating a username field in the registration form requires adding the field in the register.blade.php file, ensuring validation and error handling through Laravel, and understanding the role of controllers in managing logic and data manipulation.']}], 'duration': 1405.139, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE1376827.jpg', 'highlights': ['Demonstrates usage of SQLite for database management in Laravel, including migration using PHP artisan command.', 'Demonstrates replicating the Instagram layout functionality, including using flexbox for alignment and creating a multi-column section.', 'Process of adding fonts involves selecting a font from Google API, customizing it to include different weights, and referencing it in the variables file.', 'Incorporating a username field in the registration form requires adding the field in the register.blade.php file and ensuring validation through Laravel.']}, {'end': 3699.469, 'segs': [{'end': 2823.61, 'src': 'embed', 'start': 2782.647, 'weight': 0, 'content': [{'end': 2784.43, 'text': "So let's open up this controllers directory.", 'start': 2782.647, 'duration': 1.783}, {'end': 2786.74, 'text': 'and we have this off.', 'start': 2785.68, 'duration': 1.06}, {'end': 2789.321, 'text': 'Again, this was another directory that got added.', 'start': 2787.12, 'duration': 2.201}, {'end': 2791.101, 'text': 'When we ran that make off.', 'start': 2789.841, 'duration': 1.26}, {'end': 2799.343, 'text': "That's how powerful this command and it really does go into your application and changes a bunch of stuff for you to get it ready to have users.", 'start': 2791.521, 'duration': 7.822}, {'end': 2803.004, 'text': "So I'm glad we're not having to do this because it is a lot of work.", 'start': 2799.943, 'duration': 3.061}, {'end': 2805.125, 'text': "There's a lot of little edge cases and things like that.", 'start': 2803.044, 'duration': 2.081}, {'end': 2806.665, 'text': "Let's open up off.", 'start': 2805.765, 'duration': 0.9}, {'end': 2809.466, 'text': "And now let's go to the register controller.", 'start': 2807.205, 'duration': 2.261}, {'end': 2814.787, 'text': 'So, as I said before, if the controller is what holds the logic for registering a user,', 'start': 2810.006, 'duration': 4.781}, {'end': 2819.909, 'text': 'then clearly the register controller is the one in charge of registering our users.', 'start': 2815.467, 'duration': 4.442}, {'end': 2821.889, 'text': "Okay, that's fair enough.", 'start': 2820.469, 'duration': 1.42}, {'end': 2823.61, 'text': 'I think that was pretty self explanatory.', 'start': 2821.949, 'duration': 1.661}], 'summary': "The 'off' command automates changes, saving time and effort, making user registration easier.", 'duration': 40.963, 'max_score': 2782.647, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE2782647.jpg'}, {'end': 2898.399, 'src': 'embed', 'start': 2874.593, 'weight': 3, 'content': [{'end': 2882.255, 'text': 'But just know that Laravel is able to validate that that email address, in the case of this, is unique in our database,', 'start': 2874.593, 'duration': 7.662}, {'end': 2885.636, 'text': 'meaning that you cannot re-register with the same email.', 'start': 2882.255, 'duration': 3.381}, {'end': 2886.936, 'text': "So that's pretty cool.", 'start': 2886.116, 'duration': 0.82}, {'end': 2887.776, 'text': "Let's check this out.", 'start': 2887.116, 'duration': 0.66}, {'end': 2888.717, 'text': "Let's see that in action.", 'start': 2887.916, 'duration': 0.801}, {'end': 2890.717, 'text': "I'm not even going to put a name.", 'start': 2889.477, 'duration': 1.24}, {'end': 2892.497, 'text': "I'm just going to do test at test.com.", 'start': 2890.757, 'duration': 1.74}, {'end': 2894.538, 'text': 'Obviously, that is our email.', 'start': 2892.558, 'duration': 1.98}, {'end': 2895.578, 'text': "I'm going to hit Register.", 'start': 2894.558, 'duration': 1.02}, {'end': 2898.399, 'text': 'And it says this email has already been taken.', 'start': 2896.378, 'duration': 2.021}], 'summary': 'Laravel validates email uniqueness, preventing re-registration with the same email.', 'duration': 23.806, 'max_score': 2874.593, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE2874593.jpg'}, {'end': 2989.404, 'src': 'embed', 'start': 2918.669, 'weight': 4, 'content': [{'end': 2922.571, 'text': "All it's doing is it needs to be a unique on the users table.", 'start': 2918.669, 'duration': 3.902}, {'end': 2923.611, 'text': 'Fair enough.', 'start': 2923.211, 'duration': 0.4}, {'end': 2930.217, 'text': 'As a matter of fact, this username also needs to be unique, we cannot have two users with the same username.', 'start': 2924.192, 'duration': 6.025}, {'end': 2934.14, 'text': "So we'll keep that we'll keep the max 255.", 'start': 2930.597, 'duration': 3.543}, {'end': 2937.602, 'text': "Obviously, email, let's get rid of because it is not an email.", 'start': 2934.14, 'duration': 3.462}, {'end': 2942.967, 'text': 'So our username needs to be required, meaning it needs to be present, it needs to be there.', 'start': 2938.303, 'duration': 4.664}, {'end': 2947.771, 'text': 'it needs to be a string, meaning it should not be some floating point or anything like that.', 'start': 2943.607, 'duration': 4.164}, {'end': 2954.176, 'text': 'And it can only have up to 255 characters, and it needs to be unique in our users table.', 'start': 2948.591, 'duration': 5.585}, {'end': 2959.04, 'text': "So all of that with this single line of code, we're going to be able to validate all that for us.", 'start': 2954.897, 'duration': 4.143}, {'end': 2961.782, 'text': "So let's go ahead and hit register now.", 'start': 2959.801, 'duration': 1.981}, {'end': 2966.906, 'text': 'And sure enough, we do see that the username field is now required.', 'start': 2962.603, 'duration': 4.303}, {'end': 2968.347, 'text': "So that's pretty cool.", 'start': 2967.507, 'duration': 0.84}, {'end': 2970.129, 'text': 'We are able to do that.', 'start': 2968.988, 'duration': 1.141}, {'end': 2972.891, 'text': "However, we're not quite done just yet.", 'start': 2970.689, 'duration': 2.202}, {'end': 2974.892, 'text': "We've taken care of the validation.", 'start': 2973.391, 'duration': 1.501}, {'end': 2977.554, 'text': 'But to be honest, you remember migrations.', 'start': 2975.093, 'duration': 2.461}, {'end': 2978.835, 'text': 'We talked about them already.', 'start': 2977.675, 'duration': 1.16}, {'end': 2981.838, 'text': 'Migrations, again, describe your database.', 'start': 2979.176, 'duration': 2.662}, {'end': 2989.404, 'text': 'So, if we are adding a username to our users table, then of course we need to make a modification to our migration,', 'start': 2982.338, 'duration': 7.066}], 'summary': 'Username in users table must be unique, required, and max 255 characters.', 'duration': 70.735, 'max_score': 2918.669, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE2918669.jpg'}, {'end': 3304.309, 'src': 'embed', 'start': 3276.147, 'weight': 6, 'content': [{'end': 3282.272, 'text': 'Remember, whenever you create a new migration, or you make changes to your database, basically, you need to remake your database.', 'start': 3276.147, 'duration': 6.125}, {'end': 3284.434, 'text': 'So we can run migrate fresh.', 'start': 3282.652, 'duration': 1.782}, {'end': 3288.859, 'text': 'And that will erase everything and create everything again.', 'start': 3285.194, 'duration': 3.665}, {'end': 3290.462, 'text': 'So you see it drops all the tables.', 'start': 3288.879, 'duration': 1.583}, {'end': 3293.426, 'text': 'And then it migrates our database one more time.', 'start': 3291.022, 'duration': 2.404}, {'end': 3296.27, 'text': 'Great There is one more step.', 'start': 3294.347, 'duration': 1.923}, {'end': 3297.772, 'text': "Let's go back to PHP storm.", 'start': 3296.53, 'duration': 1.242}, {'end': 3304.309, 'text': "And let's go up here to app And then there's this user.php class.", 'start': 3298.293, 'duration': 6.016}], 'summary': 'Creating a new migration requires remaking the database, running migrate fresh erases and recreates everything, including dropping all tables.', 'duration': 28.162, 'max_score': 3276.147, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE3276147.jpg'}, {'end': 3357.553, 'src': 'embed', 'start': 3328.925, 'weight': 7, 'content': [{'end': 3333.107, 'text': 'Now. the reason for this is just an extra layer of protection that level is giving us,', 'start': 3328.925, 'duration': 4.182}, {'end': 3337.75, 'text': "so that a malicious user does not add anything to our database that it's not supposed to be there.", 'start': 3333.107, 'duration': 4.643}, {'end': 3344.814, 'text': "So of course, as we've done before, we need to replicate this and we need to add a new one for username.", 'start': 3338.53, 'duration': 6.284}, {'end': 3348.768, 'text': 'Alright, I think now we are ready.', 'start': 3346.047, 'duration': 2.721}, {'end': 3352.791, 'text': 'If I hit refresh, right now, obviously, it bumps me out.', 'start': 3349.489, 'duration': 3.302}, {'end': 3357.553, 'text': 'Because when I ran the PHP artists and migrate fresh, it actually erased the entire database.', 'start': 3352.891, 'duration': 4.662}], 'summary': 'Implementing extra layer of protection to prevent unauthorized database entries', 'duration': 28.628, 'max_score': 3328.925, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE3328925.jpg'}, {'end': 3649.233, 'src': 'embed', 'start': 3614.048, 'weight': 9, 'content': [{'end': 3615.969, 'text': "But to be honest with you, let's check this out.", 'start': 3614.048, 'duration': 1.921}, {'end': 3620.652, 'text': 'Is that the right functionality? Back here in Instagram, we are actually not even signed in.', 'start': 3616.069, 'duration': 4.583}, {'end': 3621.452, 'text': 'Check this out.', 'start': 3620.932, 'duration': 0.52}, {'end': 3623.673, 'text': 'You see, we have the login and sign up buttons down here.', 'start': 3621.552, 'duration': 2.121}, {'end': 3629.416, 'text': 'So clearly, this should be viewable, even if the user is not signed in.', 'start': 3624.394, 'duration': 5.022}, {'end': 3633.539, 'text': 'So what I want to do is I want to stop using this controller altogether.', 'start': 3630.097, 'duration': 3.442}, {'end': 3636.08, 'text': 'And I want to make our own controller.', 'start': 3633.979, 'duration': 2.101}, {'end': 3641.503, 'text': 'So how do we make a controller back in the terminal? Let me exit out of tinker.', 'start': 3636.6, 'duration': 4.903}, {'end': 3649.233, 'text': "And what we're looking for is a make command, make commands will allow you to make all sorts of different things.", 'start': 3642.406, 'duration': 6.827}], 'summary': 'The speaker wants to create their own controller using a make command to solve functionality issues on instagram.', 'duration': 35.185, 'max_score': 3614.048, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE3614048.jpg'}], 'start': 2782.647, 'title': 'Laravel application setup and interaction', 'summary': "Discusses the significance of the 'controllers' directory and the 'register controller', laravel's validation process, and interacting with a laravel application using tinker, covering unique email validation, user registration, and database modification through migrations.", 'chapters': [{'end': 2823.61, 'start': 2782.647, 'title': 'Controller directory and register controller', 'summary': "Discusses the significance of the 'controllers' directory and the 'register controller' in the application setup process, highlighting the power of the 'make off' command and the intricate logic involved in user registration.", 'duration': 40.963, 'highlights': ["The 'make off' command significantly impacts the application by automating various changes to facilitate user readiness.", "The 'register controller' is responsible for the intricate logic involved in user registration within the application.", "The 'controllers' directory plays a crucial role in application setup and management."]}, {'end': 3206.44, 'start': 2824.21, 'title': 'Laravel validation and database modification', 'summary': "Discusses laravel's validation process, including the use of unique email validation, and the need for database modification through migrations when adding a new 'username' field to the users table.", 'duration': 382.23, 'highlights': ["Laravel validates email uniqueness and string length, ensuring no duplicate email addresses can be registered, as demonstrated by the 'test at test.com' email registration.", "The need for the 'username' field to be unique and required, along with being properly integrated into the database through migrations for effective validation and data integrity.", "Discussion on the modification of the database through migrations when adding a new 'username' field to the users table, ensuring the required database structure is maintained."]}, {'end': 3699.469, 'start': 3206.941, 'title': 'Interacting with laravel application using tinker', 'summary': 'Demonstrates how to interact with a laravel application using tinker, including creating and migrating database tables, modifying models, registering new users with unique usernames, and customizing controllers to accommodate unauthenticated users.', 'duration': 492.528, 'highlights': ['Creating and migrating database tables', 'Adding a new field to the model for extra protection', 'Registering a new user with a unique username', 'Customizing controllers to accommodate unauthenticated users']}], 'duration': 916.822, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE2782647.jpg', 'highlights': ["The 'make off' command significantly impacts the application by automating various changes to facilitate user readiness.", "The 'register controller' is responsible for the intricate logic involved in user registration within the application.", "The 'controllers' directory plays a crucial role in application setup and management.", "Laravel validates email uniqueness and string length, ensuring no duplicate email addresses can be registered, as demonstrated by the 'test at test.com' email registration.", "The need for the 'username' field to be unique and required, along with being properly integrated into the database through migrations for effective validation and data integrity.", "Discussion on the modification of the database through migrations when adding a new 'username' field to the users table, ensuring the required database structure is maintained.", 'Creating and migrating database tables', 'Adding a new field to the model for extra protection', 'Registering a new user with a unique username', 'Customizing controllers to accommodate unauthenticated users']}, {'end': 5777.358, 'segs': [{'end': 3867.029, 'src': 'embed', 'start': 3834.486, 'weight': 2, 'content': [{'end': 3837.507, 'text': 'And what I want to show you is a little bit of the documentation of Laravel.', 'start': 3834.486, 'duration': 3.021}, {'end': 3838.668, 'text': "So let's jump into Laravel.", 'start': 3837.547, 'duration': 1.121}, {'end': 3843.15, 'text': "And let's just do a quick Google search for restful controllers.", 'start': 3839.028, 'duration': 4.122}, {'end': 3844.351, 'text': "And let's see what we get.", 'start': 3843.51, 'duration': 0.841}, {'end': 3849.013, 'text': "This very first result here restful resource controllers, this is what I'm interested in.", 'start': 3844.731, 'duration': 4.282}, {'end': 3852.996, 'text': 'level follows the convention of a restful controller.', 'start': 3849.893, 'duration': 3.103}, {'end': 3858.681, 'text': "And if you've never seen this concept before, it is basically a predetermined number of verbs that you can use.", 'start': 3853.096, 'duration': 5.585}, {'end': 3860.503, 'text': "In our case, obviously, it's gonna be seven.", 'start': 3858.821, 'duration': 1.682}, {'end': 3867.029, 'text': 'And each of these actions will be matched to a particular URL, verb and action.', 'start': 3860.943, 'duration': 6.086}], 'summary': 'Introduction to restful controllers in laravel, covering seven predetermined verbs and their matching actions.', 'duration': 32.543, 'max_score': 3834.486, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE3834486.jpg'}, {'end': 4330.377, 'src': 'embed', 'start': 4304.022, 'weight': 0, 'content': [{'end': 4312.027, 'text': 'And what that means is that you can use SQLite, you can use MySQL, you can use Postgres, you can use any number of different databases,', 'start': 4304.022, 'duration': 8.005}, {'end': 4314.048, 'text': "but you're writing the exact same code.", 'start': 4312.027, 'duration': 2.021}, {'end': 4319.431, 'text': 'So if you learn how to write eloquent queries, then you can write for any of the other platforms.', 'start': 4314.428, 'duration': 5.003}, {'end': 4323.513, 'text': 'In our case, obviously, our example is running right now on SQLite.', 'start': 4319.551, 'duration': 3.962}, {'end': 4330.377, 'text': "But in a real production server, you're probably going to use my SQL Maria DB, some sort of implementation of my SQL.", 'start': 4324.093, 'duration': 6.284}], 'summary': 'Eloquent queries can be written for various databases, such as sqlite, mysql, and postgres, with the same code.', 'duration': 26.355, 'max_score': 4304.022, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE4304022.jpg'}, {'end': 4394.01, 'src': 'embed', 'start': 4364.436, 'weight': 6, 'content': [{'end': 4369.438, 'text': "If you're going to represent something in your database, then you need to describe it inside a migration file.", 'start': 4364.436, 'duration': 5.002}, {'end': 4375.52, 'text': 'So this will do all that for us in a single command, it will actually create two files for us instead of one.', 'start': 4369.638, 'duration': 5.882}, {'end': 4379.766, 'text': "So let's run PHP artisan make a model.", 'start': 4376.1, 'duration': 3.666}, {'end': 4383.147, 'text': "And what is the name of the model, we're creating a profile.", 'start': 4380.266, 'duration': 2.881}, {'end': 4386.848, 'text': "And let's run the dash m flag, hit enter.", 'start': 4383.747, 'duration': 3.101}, {'end': 4389.048, 'text': 'And so we see that our model was created.', 'start': 4387.468, 'duration': 1.58}, {'end': 4394.01, 'text': 'And it also created a migration of create profiles table.', 'start': 4389.148, 'duration': 4.862}], 'summary': "Using php artisan, a model and migration file for 'profile' was created.", 'duration': 29.574, 'max_score': 4364.436, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE4364436.jpg'}, {'end': 4546.934, 'src': 'embed', 'start': 4512.098, 'weight': 9, 'content': [{'end': 4514.258, 'text': "So all three of them, we're going to make them nullable.", 'start': 4512.098, 'duration': 2.16}, {'end': 4518.22, 'text': 'That way, the user is not required to have them at all times.', 'start': 4514.558, 'duration': 3.662}, {'end': 4527.226, 'text': 'But this table right now needs to connect to our user, because a user has a profile and a profile belongs to a user.', 'start': 4519.363, 'duration': 7.863}, {'end': 4527.926, 'text': 'does it not right?', 'start': 4527.226, 'duration': 0.7}, {'end': 4529.987, 'text': "it's a one to one relationship.", 'start': 4527.926, 'duration': 2.061}, {'end': 4532.528, 'text': "Of course, we're talking about relational databases.", 'start': 4530.567, 'duration': 1.961}, {'end': 4536.39, 'text': 'So your different tables are going to have some sort of relationship with each other.', 'start': 4532.708, 'duration': 3.682}, {'end': 4546.934, 'text': 'So how do we connect that? Well, at the database level, we need to have a table and we need to have a column with unsigned big integer.', 'start': 4536.79, 'duration': 10.144}], 'summary': 'Making three fields nullable to allow optional user profiles in a one-to-one relationship within a relational database.', 'duration': 34.836, 'max_score': 4512.098, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE4512098.jpg'}, {'end': 4623.433, 'src': 'embed', 'start': 4594.172, 'weight': 1, 'content': [{'end': 4598.034, 'text': 'Well, you may have guessed it we have to migrate our database, right?', 'start': 4594.172, 'duration': 3.862}, {'end': 4603.037, 'text': 'we want to tell Laravel well, go ahead and implement this new description that we just did.', 'start': 4598.034, 'duration': 5.003}, {'end': 4605.119, 'text': 'So we do have the up method.', 'start': 4603.778, 'duration': 1.341}, {'end': 4606.199, 'text': "And that's what's going to run.", 'start': 4605.219, 'duration': 0.98}, {'end': 4611.903, 'text': 'But do keep in mind, there is the down method migrations can run forwards and backwards.', 'start': 4606.76, 'duration': 5.143}, {'end': 4617.226, 'text': "So when you run backwards, meaning you're reversing what you did, that's when you run the down method.", 'start': 4612.323, 'duration': 4.903}, {'end': 4620.229, 'text': 'Now Laravel has been nice enough to create the down method for us.', 'start': 4617.666, 'duration': 2.563}, {'end': 4623.433, 'text': 'And all it does is it deletes that profiles table.', 'start': 4620.63, 'duration': 2.803}], 'summary': 'Migrating database with laravel to implement new description, including up and down methods.', 'duration': 29.261, 'max_score': 4594.172, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE4594172.jpg'}, {'end': 4677.448, 'src': 'embed', 'start': 4651.594, 'weight': 3, 'content': [{'end': 4656.079, 'text': 'But we still need to let Laravel know how to handle this relationship properly.', 'start': 4651.594, 'duration': 4.485}, {'end': 4665.603, 'text': 'Now we used a couple of keywords in the previous explanation, where we talked about how a user has one profile, and a profile belongs to a user.', 'start': 4656.579, 'duration': 9.024}, {'end': 4667.944, 'text': 'Now that is just plain English.', 'start': 4666.103, 'duration': 1.841}, {'end': 4672.826, 'text': 'And Laravel has done a great way of transitioning that into actual code.', 'start': 4668.364, 'duration': 4.462}, {'end': 4674.627, 'text': "So we're going to write it just like that.", 'start': 4672.946, 'duration': 1.681}, {'end': 4675.947, 'text': 'So let me show you how to do that.', 'start': 4674.847, 'duration': 1.1}, {'end': 4677.448, 'text': "I'm going to close that.", 'start': 4676.487, 'duration': 0.961}], 'summary': 'Laravel handles user-profile relationship transition into code.', 'duration': 25.854, 'max_score': 4651.594, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE4651594.jpg'}, {'end': 5325.713, 'src': 'embed', 'start': 5300.083, 'weight': 7, 'content': [{'end': 5305.125, 'text': 'Well, in the simple terms is, there is no user by the profile of two and everything blows up.', 'start': 5300.083, 'duration': 5.042}, {'end': 5307.046, 'text': "And that's not quite what we want, right?", 'start': 5305.185, 'duration': 1.861}, {'end': 5314.528, 'text': 'We really just want to have a maybe a resource not found type of 404 error, not this blowing up thing in our application.', 'start': 5307.086, 'duration': 7.442}, {'end': 5318.43, 'text': "So let's go back and let's see how we can actually handle that.", 'start': 5315.229, 'duration': 3.201}, {'end': 5319.89, 'text': 'Back to PHP storm.', 'start': 5318.97, 'duration': 0.92}, {'end': 5322.411, 'text': "And let's go into our controller.", 'start': 5320.391, 'duration': 2.02}, {'end': 5325.713, 'text': "That's profile controller, And there we are.", 'start': 5322.751, 'duration': 2.962}], 'summary': 'To avoid application errors, handle profile not found with 404 error in php storm.', 'duration': 25.63, 'max_score': 5300.083, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE5300083.jpg'}, {'end': 5440.664, 'src': 'embed', 'start': 5414.089, 'weight': 4, 'content': [{'end': 5420.196, 'text': "So let's go through the sequence, maybe this time a little bit quicker, now that we know kind of what we're doing creating the migration,", 'start': 5414.089, 'duration': 6.107}, {'end': 5421.817, 'text': 'creating the relationships and all of that.', 'start': 5420.196, 'duration': 1.621}, {'end': 5423.739, 'text': "Let's go a little bit quicker through this.", 'start': 5422.158, 'duration': 1.581}, {'end': 5430.466, 'text': "And the next relationship that we're going to tackle is going to be a one too many, because of course there is one user,", 'start': 5424.1, 'duration': 6.366}, {'end': 5433.038, 'text': "but they're going to have many posts.", 'start': 5431.377, 'duration': 1.661}, {'end': 5440.664, 'text': "So this relationship is a little bit different than a profile to a user because there's always going to be one user associated to one profile.", 'start': 5433.539, 'duration': 7.125}], 'summary': 'Creating migration and one-to-many relationship for users and posts.', 'duration': 26.575, 'max_score': 5414.089, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE5414089.jpg'}], 'start': 3699.809, 'title': 'Laravel model creation and database relationships', 'summary': 'Covers creating profiles and post controllers, defining models, and managing database relationships in laravel. it emphasizes restful actions, conventions, and eloquent features to create a cleaner code base and establish connections between models, with a focus on the process of database migration and error handling.', 'chapters': [{'end': 3894.028, 'start': 3699.809, 'title': 'Laravel profiles controller', 'summary': 'Introduces creating a new profiles controller in laravel, emphasizing the importance of restful actions and following conventions, which can result in lighter controllers, easier application updates, and a cleaner code base.', 'duration': 194.219, 'highlights': ['The importance of using restful actions and following conventions in Laravel for creating a new profiles controller is emphasized.', 'The concept of restful controllers with a predetermined number of verbs and actions is explained, highlighting its importance in facilitating development.', 'The process of creating a new profiles controller and updating routes to use it is demonstrated.']}, {'end': 4280.119, 'start': 3894.648, 'title': 'Creating profile model in laravel', 'summary': 'Explains the process of creating a profile model in laravel, including defining a route with a variable, fetching user data from a model, passing data to a view, and creating a new model and migration using php artisan.', 'duration': 385.471, 'highlights': ['The chapter emphasizes the importance of creating a profile model in Laravel to handle profile information for users, as it represents a table in the database.', 'The chapter explains the process of defining a route with a variable in Laravel, which involves using curly brackets to indicate a variable in the route.', "The transcript details the process of fetching user data from a model in Laravel, using the 'find' method to retrieve the user with a specific username.", 'The chapter demonstrates the method of passing data to a view in Laravel, using an array as the second argument and the mustache syntax for echoing out the data.', "The chapter covers the process of creating a new model and migration in Laravel using the PHP artisan command 'make model', which represents a table in the database."]}, {'end': 4593.632, 'start': 4280.78, 'title': 'Eloquent models and migrations', 'summary': "Discusses eloquent models and migrations, highlighting the database agnostic feature of eloquent, the creation of models and migrations using laravel's artisan command, and the process of defining a table structure and its relationship to another table.", 'duration': 312.852, 'highlights': ['Eloquent models allow for database agnostic code, enabling the use of different databases with the same codebase.', 'Artisan command creates both a model and migration file, streamlining the process of defining database structures.', 'Defining the table structure includes specifying data types, making fields nullable, and establishing relationships between tables.']}, {'end': 5280.366, 'start': 4594.172, 'title': 'Database migration and relationship handling in laravel', 'summary': "Covers the process of migrating a database in laravel, including the use of 'up' and 'down' methods, and creating and managing relationships between models. it also demonstrates using laravel's eloquent relationships to establish connections between models and manage data persistence in the database.", 'duration': 686.194, 'highlights': ["Laravel's migration process involves running the 'up' method to forward migrate and the 'down' method to reverse the migration, providing a smooth database migration experience.", 'Establishing model relationships in Laravel involves following naming conventions to simplify the process, while allowing the flexibility to override defaults when necessary.', "Using Laravel's eloquent relationships, such as 'belongsTo' and 'hasOne', allows for efficient management of model connections and data persistence in the database.", "The 'push' method in Laravel allows for recursively saving changes in relationships, providing a convenient way to manage and persist data in the database."]}, {'end': 5777.358, 'start': 5280.826, 'title': 'Handling 404 errors and creating post models', 'summary': "Discusses handling 404 errors by implementing a 'find or fail' method in the profile controller, and creating a post model with a one-to-many relationship with a user.", 'duration': 496.532, 'highlights': ["The chapter discusses handling 404 errors by implementing a 'find or fail' method in the profile controller.", 'Creating a post model with a one-to-many relationship with a user.']}], 'duration': 2077.549, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE3699809.jpg', 'highlights': ['Eloquent models enable database agnostic code, facilitating use of different databases.', "Laravel's migration process involves 'up' and 'down' methods for smooth migration.", 'Laravel emphasizes restful actions and conventions for creating a new profiles controller.', 'Establishing model relationships in Laravel involves following naming conventions.', 'Creating a post model with a one-to-many relationship with a user is demonstrated.', "Using Laravel's eloquent relationships allows for efficient management of model connections.", 'Artisan command creates both a model and migration file, streamlining database structure definition.', "Handling 404 errors by implementing a 'find or fail' method in the profile controller.", "Creating a new model and migration in Laravel using the PHP artisan command 'make model'.", 'Defining the table structure includes specifying data types, making fields nullable, and establishing relationships.']}, {'end': 7273.257, 'segs': [{'end': 5831.164, 'src': 'embed', 'start': 5802.348, 'weight': 8, 'content': [{'end': 5803.789, 'text': 'So we load that page instead.', 'start': 5802.348, 'duration': 1.441}, {'end': 5806.831, 'text': 'Now we kind of see the same thing, but there is no profile behind.', 'start': 5804.27, 'duration': 2.561}, {'end': 5808.973, 'text': "So let's check out what they did.", 'start': 5807.432, 'duration': 1.541}, {'end': 5811.634, 'text': 'So they did slash P for post.', 'start': 5809.053, 'duration': 2.581}, {'end': 5815.677, 'text': 'And then they did some sort of unique ID on that post.', 'start': 5812.135, 'duration': 3.542}, {'end': 5819.119, 'text': "So let's just go ahead and follow that slash P.", 'start': 5816.197, 'duration': 2.922}, {'end': 5821.061, 'text': 'I would normally probably just say posts.', 'start': 5819.119, 'duration': 1.942}, {'end': 5823.742, 'text': 'you can do post, you can do slash P.', 'start': 5821.641, 'duration': 2.101}, {'end': 5828.943, 'text': "either way, since we're kind of creating a clone out of Instagram, let's go ahead and just follow exactly what they did.", 'start': 5823.742, 'duration': 5.201}, {'end': 5831.164, 'text': 'So slash P it is.', 'start': 5829.423, 'duration': 1.741}], 'summary': "Analyzing instagram's post url structure, following their approach for cloning the platform.", 'duration': 28.816, 'max_score': 5802.348, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE5802348.jpg'}, {'end': 5894.64, 'src': 'embed', 'start': 5866.647, 'weight': 9, 'content': [{'end': 5869.95, 'text': "So web that PHP, let's go ahead and add it right here.", 'start': 5866.647, 'duration': 3.303}, {'end': 5873.675, 'text': "We'll say route get slash P.", 'start': 5870.431, 'duration': 3.244}, {'end': 5877.939, 'text': "And what is that going to go to? Well, it's going to go to a new controller that doesn't exist yet.", 'start': 5873.675, 'duration': 4.264}, {'end': 5879.761, 'text': "It's going to be posts controller.", 'start': 5878.28, 'duration': 1.481}, {'end': 5885.848, 'text': "At back to Chrome, create, right, that's the action that we're going to take.", 'start': 5881.363, 'duration': 4.485}, {'end': 5887.37, 'text': "So that's going to go to create.", 'start': 5885.888, 'duration': 1.482}, {'end': 5890.033, 'text': "Let's go back here and say at create.", 'start': 5887.39, 'duration': 2.643}, {'end': 5894.64, 'text': "Now we could give this route a name, but we're not using them right now.", 'start': 5891.957, 'duration': 2.683}], 'summary': "Creating a route in php for posts controller to 'create' action.", 'duration': 27.993, 'max_score': 5866.647, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE5866647.jpg'}, {'end': 6007.787, 'src': 'embed', 'start': 5982.761, 'weight': 3, 'content': [{'end': 5989.604, 'text': "And right now we've been working with home that blade, as you can imagine if we had hundreds of views.", 'start': 5982.761, 'duration': 6.843}, {'end': 5994.086, 'text': "this needs some organization and it's going to be in the form of some sort of directories.", 'start': 5989.604, 'duration': 4.482}, {'end': 5995.879, 'text': "So let's do that.", 'start': 5995.319, 'duration': 0.56}, {'end': 6000.603, 'text': "Now, if we said views, let's go ahead and create a new directory.", 'start': 5995.939, 'duration': 4.664}, {'end': 6003.925, 'text': 'And this is going to hold all of the views for our posts.', 'start': 6001.043, 'duration': 2.882}, {'end': 6007.787, 'text': "So posts, and inside of here, that's where we're going to put our view.", 'start': 6004.565, 'duration': 3.222}], 'summary': 'Organize hundreds of views into directories for posts.', 'duration': 25.026, 'max_score': 5982.761, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE5982761.jpg'}, {'end': 6053.286, 'src': 'embed', 'start': 6027.501, 'weight': 6, 'content': [{'end': 6033.126, 'text': 'And I put them inside a directory, which is basically the first part of my controller name.', 'start': 6027.501, 'duration': 5.625}, {'end': 6037.87, 'text': 'This naming convention will help you find everything you need in your application.', 'start': 6033.886, 'duration': 3.984}, {'end': 6041.953, 'text': "And it doesn't matter how large it gets, it always makes sense.", 'start': 6038.19, 'duration': 3.763}, {'end': 6046.818, 'text': "you don't have to think about what you're going to name things, you're just going to automatically name it what it is.", 'start': 6042.233, 'duration': 4.585}, {'end': 6053.286, 'text': 'So if you have the post controller, then all of the views for that are going to go inside a post directory.', 'start': 6047.279, 'duration': 6.007}], 'summary': 'Using a directory with controller name aids in organizing and finding application components easily.', 'duration': 25.785, 'max_score': 6027.501, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE6027501.jpg'}, {'end': 6182.749, 'src': 'embed', 'start': 6153.162, 'weight': 7, 'content': [{'end': 6155.822, 'text': "Sometimes I'll yield something in the head, for example.", 'start': 6153.162, 'duration': 2.66}, {'end': 6161.683, 'text': 'If I have a particular script that is only particular to one page, I can yield a script section.', 'start': 6155.862, 'duration': 5.821}, {'end': 6163.284, 'text': 'You can yield the title.', 'start': 6162.144, 'duration': 1.14}, {'end': 6165.484, 'text': 'You can yield just about anything.', 'start': 6163.704, 'duration': 1.78}, {'end': 6168.405, 'text': "And I'll show you how to do a little bit more of that in just a second.", 'start': 6165.824, 'duration': 2.581}, {'end': 6176.467, 'text': 'But for now again, this home, that blade, that PHP, this is not really following the same convention that I was talking about with this right?', 'start': 6168.965, 'duration': 7.502}, {'end': 6178.868, 'text': 'Because we have our profile controller.', 'start': 6176.507, 'duration': 2.361}, {'end': 6182.749, 'text': 'And our profiles controller has this index method.', 'start': 6179.948, 'duration': 2.801}], 'summary': 'Demonstrating yielding in code, discussing php conventions.', 'duration': 29.587, 'max_score': 6153.162, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE6153162.jpg'}, {'end': 6365.764, 'src': 'heatmap', 'start': 6200.794, 'weight': 1, 'content': [{'end': 6203.014, 'text': 'So profiles exactly like that.', 'start': 6200.794, 'duration': 2.22}, {'end': 6206.976, 'text': "And then we're going to take this home that blade and let's move it into profiles.", 'start': 6203.475, 'duration': 3.501}, {'end': 6209.357, 'text': "And let's go ahead and rename it once is in there.", 'start': 6207.276, 'duration': 2.081}, {'end': 6216.519, 'text': 'So profiles is not home that blade that PHP, but it is the index, right method name.', 'start': 6209.797, 'duration': 6.722}, {'end': 6219.12, 'text': 'So index that blade that PHP.', 'start': 6217.119, 'duration': 2.001}, {'end': 6222.021, 'text': "Alright, so let's refactor rename is not home.", 'start': 6219.46, 'duration': 2.561}, {'end': 6224.862, 'text': 'It is index that blade that PHP.', 'start': 6222.921, 'duration': 1.941}, {'end': 6227.18, 'text': 'refactor, there we go.', 'start': 6225.919, 'duration': 1.261}, {'end': 6236.369, 'text': "So now here is no longer home, but rather it's profiles dot index, that's going to be our view for that particular resource.", 'start': 6227.661, 'duration': 8.708}, {'end': 6239.432, 'text': "So let's go back here and hit refresh.", 'start': 6236.95, 'duration': 2.482}, {'end': 6246.099, 'text': 'And if we did everything right, of course, it keeps working, there is no visual difference for that one, that is just a convenience refactor.', 'start': 6240.173, 'duration': 5.926}, {'end': 6252.26, 'text': "Alright, so now that we have that, let's keep going with what we were actually doing, which is this post controller.", 'start': 6247.199, 'duration': 5.061}, {'end': 6257.681, 'text': "So this creates, let's go ahead and just copy for now, let's modify this one.", 'start': 6252.78, 'duration': 4.901}, {'end': 6259.761, 'text': "So I'm going to make a duplicate copy of it.", 'start': 6257.721, 'duration': 2.04}, {'end': 6268.663, 'text': "And it's not index, it's create that blade that PHP, and it's not going to be inside profiles, but it's going to be inside posts, hit OK.", 'start': 6260.201, 'duration': 8.462}, {'end': 6270.743, 'text': "And now we've created a copy of that.", 'start': 6269.043, 'duration': 1.7}, {'end': 6275.824, 'text': "I'll go ahead and just delete all of this, as we don't need it right now.", 'start': 6271.343, 'duration': 4.481}, {'end': 6279.344, 'text': 'Alright, so we are good to go.', 'start': 6278.123, 'duration': 1.221}, {'end': 6281.465, 'text': "So let's check out our files right here on the left.", 'start': 6279.464, 'duration': 2.001}, {'end': 6286.508, 'text': 'So inside posts, we have this create that blade that PHP, which is this file right here.', 'start': 6281.925, 'duration': 4.583}, {'end': 6292.811, 'text': "And inside our post controller, we have this create method, and it's calling the post dot create.", 'start': 6287.148, 'duration': 5.663}, {'end': 6300.275, 'text': 'So with any luck, we should be able to visit this new route that we just created of slash P and check out what it is.', 'start': 6293.372, 'duration': 6.903}, {'end': 6305.528, 'text': 'Alright, so slash P there we go.', 'start': 6300.696, 'duration': 4.832}, {'end': 6306.509, 'text': 'So that is loading.', 'start': 6305.748, 'duration': 0.761}, {'end': 6309.21, 'text': 'Now we know that because of course, the navigation is showed up.', 'start': 6306.649, 'duration': 2.561}, {'end': 6310.751, 'text': "So we're almost there.", 'start': 6309.731, 'duration': 1.02}, {'end': 6314.713, 'text': 'So remember, this needs to be slash p slash create.', 'start': 6311.151, 'duration': 3.562}, {'end': 6322.758, 'text': "So let's do that one last change here in our web routes, slash p slash create that goes to the post controller and hits the Create method.", 'start': 6315.154, 'duration': 7.604}, {'end': 6327.781, 'text': 'Notice how everything is very repetitive, but it follows a very particular pattern.', 'start': 6323.218, 'duration': 4.563}, {'end': 6330.963, 'text': 'And this is going to make your applications very, very clean.', 'start': 6328.201, 'duration': 2.762}, {'end': 6338.046, 'text': "because everything is going to make sense, everything's going to have a purpose, a point, and everything's going to stay in the same guidelines.", 'start': 6331.363, 'duration': 6.683}, {'end': 6339.827, 'text': 'When you stay in these guidelines.', 'start': 6338.486, 'duration': 1.341}, {'end': 6347.63, 'text': 'it makes your application so much easier to code and so much easier to upgrade and make changes and add features and all of this.', 'start': 6339.827, 'duration': 7.803}, {'end': 6348.971, 'text': 'This is imperative.', 'start': 6347.95, 'duration': 1.021}, {'end': 6352.312, 'text': 'it is so important, cannot stress this enough.', 'start': 6348.971, 'duration': 3.341}, {'end': 6359.778, 'text': 'it is incredibly important for you to have a very strict set of naming conventions and standards for your application,', 'start': 6352.312, 'duration': 7.466}, {'end': 6360.779, 'text': 'and you need to stick with them.', 'start': 6359.778, 'duration': 1.001}, {'end': 6365.764, 'text': 'You need to be a stickler about it, because it is for the health and benefit of your application.', 'start': 6361.16, 'duration': 4.604}], 'summary': 'Refactored and organized code for profiles and posts, following strict naming conventions and standards.', 'duration': 164.97, 'max_score': 6200.794, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE6200794.jpg'}, {'end': 6673.452, 'src': 'embed', 'start': 6648.041, 'weight': 1, 'content': [{'end': 6654.283, 'text': "So action wise, let's check out what Laravel has to say about it back to Chrome, HTTP controller.", 'start': 6648.041, 'duration': 6.242}, {'end': 6656.643, 'text': 'So we are currently in the create method.', 'start': 6654.623, 'duration': 2.02}, {'end': 6660.565, 'text': 'So of course, that is going to post to the resource.', 'start': 6657.063, 'duration': 3.502}, {'end': 6662.865, 'text': "And then that's going to hit a store method.", 'start': 6660.905, 'duration': 1.96}, {'end': 6664.426, 'text': "So let's do that right now.", 'start': 6663.285, 'duration': 1.141}, {'end': 6669.91, 'text': 'So where is that going to post? Well, we know that slash P is our resource.', 'start': 6665.126, 'duration': 4.784}, {'end': 6673.452, 'text': 'Finally, this form does have a file in it.', 'start': 6670.73, 'duration': 2.722}], 'summary': 'Using laravel to handle http controller actions for posting to the resource, with a file in the form.', 'duration': 25.411, 'max_score': 6648.041, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE6648041.jpg'}, {'end': 6848.769, 'src': 'embed', 'start': 6819.291, 'weight': 0, 'content': [{'end': 6824.274, 'text': 'And the way that Laravel does this is by adding an extremely large key to each form.', 'start': 6819.291, 'duration': 4.983}, {'end': 6830.82, 'text': "And then it can validate that key and say, Did this come from this server? And if it did, then we're good to go.", 'start': 6824.755, 'duration': 6.065}, {'end': 6835.962, 'text': "But if it didn't, then we're going to go ahead and throw this 419 page expired.", 'start': 6831.38, 'duration': 4.582}, {'end': 6837.843, 'text': 'The fix is quite simple.', 'start': 6836.243, 'duration': 1.6}, {'end': 6842.346, 'text': "Let's go back into our create that blade that PHP file.", 'start': 6838.144, 'duration': 4.202}, {'end': 6848.769, 'text': 'And all we need to do inside of this form is add another blade directive, which is at CSRF.', 'start': 6842.706, 'duration': 6.063}], 'summary': 'Laravel adds a large key to forms for server validation, preventing unauthorized submissions.', 'duration': 29.478, 'max_score': 6819.291, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE6819291.jpg'}, {'end': 7032.568, 'src': 'embed', 'start': 6989.676, 'weight': 2, 'content': [{'end': 6999.771, 'text': "Right now, if we go back and hit refresh and just hit add new post, the form does post, however, it shouldn't, because really, a caption is required.", 'start': 6989.676, 'duration': 10.095}, {'end': 7001.492, 'text': 'And this is required.', 'start': 7000.171, 'duration': 1.321}, {'end': 7005.074, 'text': 'So we touched a little bit on this already when we did our registration.', 'start': 7002.012, 'duration': 3.062}, {'end': 7009.676, 'text': "But let's go back to PHP storm and do an example of that now.", 'start': 7005.474, 'duration': 4.202}, {'end': 7015.619, 'text': 'So in my store method, the very first thing that we need to do is we need to validate our request.', 'start': 7010.216, 'duration': 5.403}, {'end': 7021.342, 'text': "So we'll say our data is equal to request as a function.", 'start': 7016.239, 'duration': 5.103}, {'end': 7026.744, 'text': 'validate And notice how nice this syntax is through the request.', 'start': 7021.342, 'duration': 5.402}, {'end': 7030.387, 'text': 'validate that request and then give me back all the validated data.', 'start': 7026.744, 'duration': 3.643}, {'end': 7032.568, 'text': 'Very simple, very clean.', 'start': 7030.967, 'duration': 1.601}], 'summary': 'The form does post but a caption is required, validated through request.validate.', 'duration': 42.892, 'max_score': 6989.676, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE6989676.jpg'}], 'start': 5777.398, 'title': 'Implementing instagram post link functionality', 'summary': 'Covers implementing instagram post link functionality, organizing views in laravel, refactoring views, and addressing csrf error for laravel security, including creating controllers, directory structures, and form validation.', 'chapters': [{'end': 5961.692, 'start': 5777.398, 'title': 'Implementing instagram post link functionality', 'summary': "Discusses implementing the functionality to create a route for viewing and creating instagram post links, following the format of instagram's post link structure and creating a new controller for handling the action.", 'duration': 184.294, 'highlights': ["By analyzing Instagram's behavior, it is observed that the post link structure consists of /P followed by a unique ID, with the functionality to copy the link to the actual post. This insight guides the decision to create a route following the same structure for viewing and creating Instagram post links.", "The creation of a new controller, 'posts controller', is initiated to handle the action of creating the route for viewing and creating Instagram post links, with a focus on the 'create' action.", 'The importance of efficiently navigating through code files in an editor is emphasized, with a recommendation to utilize quick file jump commands for improved productivity and screen real estate management.']}, {'end': 6168.405, 'start': 5962.152, 'title': 'Organizing views in laravel', 'summary': "Discusses organizing views in laravel by creating a directory structure for views, following a naming convention for views and controllers, and using the 'yield' keyword in blade templates to manage content.", 'duration': 206.253, 'highlights': ['Creating a directory structure for views', 'Naming convention for views and controllers', "Using the 'yield' keyword in Blade templates"]}, {'end': 6768.264, 'start': 6168.965, 'title': 'Refactoring view and creating new post form', 'summary': 'Discusses refactoring the view and creating a new post form by moving blade files into directories, renaming files, modifying the view, and setting up the post method for adding a new post to the account.', 'duration': 599.299, 'highlights': ['Refactoring the view by moving blade files into directories and renaming files', 'Setting up the post method for adding a new post to the account', 'Modifying the view and form for creating a new post']}, {'end': 7273.257, 'start': 6768.964, 'title': 'Csrf error and laravel security', 'summary': 'Discusses the csrf error 419 page expired in laravel, which prevents unauthorized posts to forms, and demonstrates the fix by adding a csrf directive to the form. it also covers form validation and using the create method for storing data.', 'duration': 504.293, 'highlights': ['CSRF error 419 page expired is a security measure in Laravel to limit unauthorized posts to forms, preventing potential malicious activities such as creating any post without website authorization.', "Adding the @csrf directive to the form in Laravel adds an extremely large key to the form, allowing Laravel to validate the form's authenticity and ensure it comes from the server, thus enhancing security.", 'Validation in Laravel is achieved by using the request->validate() function, allowing the validation of specific fields such as caption and image, ensuring their presence and type, thus improving data integrity and security.', 'The create method in Laravel simplifies data storage by accepting an array of data, making it easier to store validated data and ignore non-validated fields, thus streamlining the data storage process.']}], 'duration': 1495.859, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE5777398.jpg', 'highlights': ['The @csrf directive in Laravel adds an extremely large key to the form, enhancing security', 'The create method in Laravel simplifies data storage by accepting an array of data', 'Validation in Laravel is achieved by using the request->validate() function', 'Refactoring the view by moving blade files into directories and renaming files', 'Setting up the post method for adding a new post to the account', 'Creating a directory structure for views', 'Naming convention for views and controllers', "Using the 'yield' keyword in Blade templates", "By analyzing Instagram's behavior, it is observed that the post link structure consists of /P followed by a unique ID", "The creation of a new controller, 'posts controller', is initiated to handle the action of creating the route for viewing and creating Instagram post links"]}, {'end': 8323.226, 'segs': [{'end': 7337.971, 'src': 'embed', 'start': 7294.073, 'weight': 2, 'content': [{'end': 7294.874, 'text': "Let's go back to Chrome.", 'start': 7294.073, 'duration': 0.801}, {'end': 7305.452, 'text': "And let's write a caption here, and choose an image, add new post, and we get an issue.", 'start': 7296.144, 'duration': 9.308}, {'end': 7309.576, 'text': 'And that is a fillable property of mass assignment issue.', 'start': 7305.933, 'duration': 3.643}, {'end': 7318.984, 'text': 'Now, if you remember, when we added that username in our registration, we had to go into the model and tell Laravel that it was okay to do that.', 'start': 7310.257, 'duration': 8.727}, {'end': 7324.846, 'text': 'And I said, this is one of those things where it protects you by default, now it can be turned off.', 'start': 7319.324, 'duration': 5.522}, {'end': 7327.067, 'text': "And that's what I'll actually end up doing.", 'start': 7325.406, 'duration': 1.661}, {'end': 7331.449, 'text': 'If we go into our post, we can actually do it in two separate ways.', 'start': 7327.687, 'duration': 3.762}, {'end': 7337.971, 'text': "Now fillable fields, again, you could be explicit about them, or you can go ahead and say, Don't worry about it, just fill everything.", 'start': 7331.569, 'duration': 6.402}], 'summary': 'Fixing mass assignment issue in laravel by adjusting fillable fields.', 'duration': 43.898, 'max_score': 7294.073, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE7294073.jpg'}, {'end': 7392.318, 'src': 'embed', 'start': 7363.198, 'weight': 0, 'content': [{'end': 7366.719, 'text': "So as long as you do that, it's okay to turn off that feature.", 'start': 7363.198, 'duration': 3.521}, {'end': 7369.939, 'text': "So let's go into post and turn that feature now.", 'start': 7367.299, 'duration': 2.64}, {'end': 7376.123, 'text': "So we can override the garden that's protected, guarded, and just pass in an empty array.", 'start': 7370.179, 'duration': 5.944}, {'end': 7385.611, 'text': "So if we say protected guarded equals empty array, then we are telling Laravel it's okay, do not guard anything, everything is okay.", 'start': 7376.623, 'duration': 8.988}, {'end': 7389.154, 'text': 'kind of leave me to my own devices and I will take care of it myself.', 'start': 7385.611, 'duration': 3.543}, {'end': 7392.318, 'text': "So with that, we're going to get another error.", 'start': 7389.835, 'duration': 2.483}], 'summary': 'Override protected garden feature to empty array, allowing laravel to not guard anything.', 'duration': 29.12, 'max_score': 7363.198, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE7363198.jpg'}, {'end': 7453.995, 'src': 'embed', 'start': 7429.252, 'weight': 1, 'content': [{'end': 7434.976, 'text': 'So the proper solution is to save through the relationship to create through the relationship.', 'start': 7429.252, 'duration': 5.724}, {'end': 7436.498, 'text': 'So let me show you how to do that.', 'start': 7435.397, 'duration': 1.101}, {'end': 7438.88, 'text': 'Now Let me start writing it up here at the top.', 'start': 7436.538, 'duration': 2.342}, {'end': 7446.948, 'text': 'So how do we get the authenticated user, the easiest way to get the authenticated user is to use the auth function.', 'start': 7439.6, 'duration': 7.348}, {'end': 7450.391, 'text': "And we'll say auth, give me the authenticated user.", 'start': 7447.108, 'duration': 3.283}, {'end': 7453.995, 'text': 'And on that user I can call the posts.', 'start': 7450.872, 'duration': 3.123}], 'summary': 'Demonstrate creating and accessing posts through user relationship using auth function.', 'duration': 24.743, 'max_score': 7429.252, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE7429252.jpg'}, {'end': 7915.301, 'src': 'embed', 'start': 7891.765, 'weight': 3, 'content': [{'end': 7898.51, 'text': 'And what it does, it creates a symbolic link between public storage to our storage app public.', 'start': 7891.765, 'duration': 6.745}, {'end': 7900.753, 'text': "And that's where our file actually is.", 'start': 7898.911, 'duration': 1.842}, {'end': 7903.597, 'text': 'But we need it to be inside the public directory.', 'start': 7901.174, 'duration': 2.423}, {'end': 7909.905, 'text': "Remember, the public directory is what's actually accessible to the public, nothing else is accessible.", 'start': 7904.038, 'duration': 5.867}, {'end': 7915.301, 'text': "So let's say PHP artisan storage link, And that's it now it created.", 'start': 7909.945, 'duration': 5.356}], 'summary': 'Creating a symbolic link with php artisan storage link to make files accessible.', 'duration': 23.536, 'max_score': 7891.765, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE7891765.jpg'}, {'end': 8153.488, 'src': 'embed', 'start': 8126.017, 'weight': 7, 'content': [{'end': 8128.86, 'text': "I'm going to delete all of the posts and start from scratch.", 'start': 8126.017, 'duration': 2.843}, {'end': 8130.882, 'text': 'How would we do that? Well, easy enough.', 'start': 8129.22, 'duration': 1.662}, {'end': 8131.762, 'text': "Let's go into Tinker.", 'start': 8130.922, 'duration': 0.84}, {'end': 8134.145, 'text': "And let's just say post truncate.", 'start': 8132.223, 'duration': 1.922}, {'end': 8137.949, 'text': 'And this will erase everything in the post table.', 'start': 8134.986, 'duration': 2.963}, {'end': 8142.153, 'text': "So now if we go back to Chrome, hit refresh, there's nothing there.", 'start': 8138.229, 'duration': 3.924}, {'end': 8145.316, 'text': 'So we are fresh, there are no posts right now.', 'start': 8142.333, 'duration': 2.983}, {'end': 8146.797, 'text': "Let's add a new post.", 'start': 8145.836, 'duration': 0.961}, {'end': 8153.488, 'text': "And that reminds me, when we hit that it actually doesn't work, we need to link to our actual create method.", 'start': 8148.086, 'duration': 5.402}], 'summary': 'Deleting all posts from the table and starting fresh, then encountering a link issue.', 'duration': 27.471, 'max_score': 8126.017, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE8126017.jpg'}, {'end': 8207.543, 'src': 'embed', 'start': 8177.229, 'weight': 4, 'content': [{'end': 8179.79, 'text': 'So we are successfully uploading a post.', 'start': 8177.229, 'duration': 2.561}, {'end': 8180.931, 'text': "Let's do another one.", 'start': 8180.211, 'duration': 0.72}, {'end': 8183.533, 'text': "Let's say my second post.", 'start': 8181.451, 'duration': 2.082}, {'end': 8191.637, 'text': "Choose a file I'm just going to choose a logo file here, add new post.", 'start': 8186.575, 'duration': 5.062}, {'end': 8192.637, 'text': 'There we go.', 'start': 8192.177, 'duration': 0.46}, {'end': 8194.838, 'text': 'But now we notice a bit of an issue.', 'start': 8193.218, 'duration': 1.62}, {'end': 8198.62, 'text': "And that is, it's actually ordering them by the uploaded sequence.", 'start': 8195.098, 'duration': 3.522}, {'end': 8202.581, 'text': 'But in Instagram, your latest posts go to the front.', 'start': 8199.219, 'duration': 3.362}, {'end': 8207.543, 'text': "So it's actually inverted, we need to change the order to make it a little bit more obvious.", 'start': 8202.922, 'duration': 4.621}], 'summary': 'Successfully uploaded posts, but need to change order for better visibility.', 'duration': 30.314, 'max_score': 8177.229, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE8177229.jpg'}, {'end': 8323.226, 'src': 'embed', 'start': 8268.932, 'weight': 5, 'content': [{'end': 8272.235, 'text': 'it adds the created at and updated at.', 'start': 8268.932, 'duration': 3.303}, {'end': 8277.799, 'text': 'both of them are nullable, but they are going to be updated for us automatically in the database.', 'start': 8272.235, 'duration': 5.564}, {'end': 8280.022, 'text': "So that's one of those nice Laravel features.", 'start': 8277.92, 'duration': 2.102}, {'end': 8284.546, 'text': "So we can just simply assume that there's a created at and just call it descending.", 'start': 8280.361, 'duration': 4.185}, {'end': 8288.51, 'text': 'Alright, back to Chrome, refresh, boom, there we go.', 'start': 8285.629, 'duration': 2.881}, {'end': 8290.87, 'text': 'So now we are in reverse order.', 'start': 8288.889, 'duration': 1.981}, {'end': 8292.67, 'text': 'What else do we need to fix here?', 'start': 8291.49, 'duration': 1.18}, {'end': 8295.05, 'text': 'Well, there is this count right.', 'start': 8293.11, 'duration': 1.94}, {'end': 8299.531, 'text': 'here is 153 posts, again another number that we hard coded.', 'start': 8295.05, 'duration': 4.481}, {'end': 8302.072, 'text': 'we now have an actual count of posts.', 'start': 8299.531, 'duration': 2.541}, {'end': 8306.433, 'text': 'So we can change that number for the actual number back to PHP storm.', 'start': 8302.492, 'duration': 3.941}, {'end': 8310.933, 'text': "And in our index, let's find that 153.", 'start': 8306.833, 'duration': 4.1}, {'end': 8316.379, 'text': "So what do we do with 153, we'll say user posts, just get me the count.", 'start': 8310.933, 'duration': 5.446}, {'end': 8318.681, 'text': "Let's go back to Chrome.", 'start': 8317.58, 'duration': 1.101}, {'end': 8321.304, 'text': 'Refresh, and there we go.', 'start': 8320.183, 'duration': 1.121}, {'end': 8323.226, 'text': 'So now we have three posts.', 'start': 8321.544, 'duration': 1.682}], 'summary': 'Laravel feature automatically updates created and updated dates, posts count is dynamically fetched and displayed.', 'duration': 54.294, 'max_score': 8268.932, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE8268932.jpg'}], 'start': 7273.538, 'title': 'Laravel application development', 'summary': 'Covers laravel mass assignment, user authentication, file upload, post management, and view updates, including potential risks, creating posts, user authentication, middleware protection, file storage, and post display adjustments resulting in three posts in reverse order.', 'chapters': [{'end': 7385.611, 'start': 7273.538, 'title': 'Laravel mass assignment', 'summary': 'Discusses the issue of mass assignment in laravel, explaining how to override the guarded property to allow for the filling of all fields and the potential risks associated with it.', 'duration': 112.073, 'highlights': ["The issue of mass assignment in Laravel is demonstrated when attempting to create a post, resulting in a 'fillable property of mass assignment issue.'", 'The default protection in Laravel prevents mass assignment, requiring explicit permission for each field, which can be overridden by setting the guarded property to an empty array.', 'The potential risk of turning off the mass assignment protection is highlighted, emphasizing the need to carefully consider each field to avoid potential security vulnerabilities.']}, {'end': 8036.037, 'start': 7385.611, 'title': 'Handling user authentication and file upload in laravel', 'summary': "Discusses how to handle user authentication and file upload in laravel, including creating posts through relationships, ensuring user authentication, protecting routes with middleware, and handling file uploads by storing and linking files in laravel's storage directory.", 'duration': 650.426, 'highlights': ["The chapter discusses how to create posts through relationships, ensuring the posting user's ID is automatically added, and protecting routes with middleware for user authentication.", "The chapter covers handling file uploads by storing files in Laravel's storage directory, creating symbolic links for public access, and redirecting after successful file upload."]}, {'end': 8323.226, 'start': 8036.377, 'title': 'View update and post management', 'summary': 'Covers updating the view to display user images and posts properly, using tinker to truncate and adding new posts, adjusting the post ordering, and dynamically updating the post count, resulting in successful display of three posts in reverse order.', 'duration': 286.849, 'highlights': ['Successfully uploading and displaying three posts in reverse order', 'Truncating and adding new posts using Tinker', 'Adjusting post ordering by creation date', 'Dynamically updating the post count']}], 'duration': 1049.688, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE7273538.jpg', 'highlights': ['The default protection in Laravel prevents mass assignment, requiring explicit permission for each field, which can be overridden by setting the guarded property to an empty array.', "The chapter discusses how to create posts through relationships, ensuring the posting user's ID is automatically added, and protecting routes with middleware for user authentication.", 'The potential risk of turning off the mass assignment protection is highlighted, emphasizing the need to carefully consider each field to avoid potential security vulnerabilities.', "The chapter covers handling file uploads by storing files in Laravel's storage directory, creating symbolic links for public access, and redirecting after successful file upload.", 'Successfully uploading and displaying three posts in reverse order', 'Adjusting post ordering by creation date', 'Dynamically updating the post count', 'Truncating and adding new posts using Tinker', "The issue of mass assignment in Laravel is demonstrated when attempting to create a post, resulting in a 'fillable property of mass assignment issue.'"]}, {'end': 9874.464, 'segs': [{'end': 8352.867, 'src': 'embed', 'start': 8323.906, 'weight': 4, 'content': [{'end': 8325.108, 'text': "Great, let's add a fourth one.", 'start': 8323.906, 'duration': 1.202}, {'end': 8331.293, 'text': "So we can see that number change fourth post, I'm going to have to repeat an image, I don't think I have any other ones.", 'start': 8325.128, 'duration': 6.165}, {'end': 8332.514, 'text': 'So add new posts.', 'start': 8331.654, 'duration': 0.86}, {'end': 8337.853, 'text': "So there we go, we have four posts, we'll tackle the rest of these as we go along.", 'start': 8333.45, 'duration': 4.403}, {'end': 8342.378, 'text': 'But now we are making progress, we are really hammering this code out.', 'start': 8337.894, 'duration': 4.484}, {'end': 8343.218, 'text': "That's great.", 'start': 8342.558, 'duration': 0.66}, {'end': 8349.343, 'text': 'Now, another thing here that I noticed right away is we do need a little bit of spacing between these lines.', 'start': 8343.839, 'duration': 5.504}, {'end': 8352.867, 'text': 'So we do need a little bit of padding at the bottom of each one of those.', 'start': 8349.404, 'duration': 3.463}], 'summary': 'Adding a fourth post, making progress on code, needing spacing between lines.', 'duration': 28.961, 'max_score': 8323.906, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE8323906.jpg'}, {'end': 8620.656, 'src': 'embed', 'start': 8588.303, 'weight': 0, 'content': [{'end': 8597.106, 'text': 'So what this will do is it will take our image, it will wrap it around the intervention class, and then it will fit it to 1200 by 1200.', 'start': 8588.303, 'duration': 8.803}, {'end': 8604.689, 'text': 'Now this is different from resizing, because resizing will change the physical dimensions of the image proportionally.', 'start': 8597.106, 'duration': 7.583}, {'end': 8607.61, 'text': 'In our case, we kind of just want to cut the image.', 'start': 8605.169, 'duration': 2.441}, {'end': 8620.656, 'text': 'we want to cut any excess that it has, and fit it to a 1200 by 1200 square image, we do want every image to be 1200 by 1200, no matter what.', 'start': 8608.03, 'duration': 12.626}], 'summary': 'Intervention class wraps image, cuts excess, fits to 1200x1200.', 'duration': 32.353, 'max_score': 8588.303, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE8588303.jpg'}, {'end': 8830.385, 'src': 'embed', 'start': 8797.193, 'weight': 3, 'content': [{'end': 8799.275, 'text': "And let's put it right after the store method.", 'start': 8797.193, 'duration': 2.082}, {'end': 8802.037, 'text': 'new public function, show.', 'start': 8800.115, 'duration': 1.922}, {'end': 8806.721, 'text': "And that's going to take a post, because it's going to give us the post ID.", 'start': 8802.637, 'duration': 4.084}, {'end': 8812.726, 'text': 'So in here, I will just output post for now, because we still need to create the view for it.', 'start': 8807.381, 'duration': 5.345}, {'end': 8814.327, 'text': "So let's go into our views.", 'start': 8813.186, 'duration': 1.141}, {'end': 8822.254, 'text': "So in our posts, we have this create that blade, let's save as and let's create a show that blade that PHP file.", 'start': 8814.747, 'duration': 7.507}, {'end': 8830.385, 'text': "Now this show that blade that PHP file, of course, everything needs to kind of go for the time being, I'll just write in show.", 'start': 8823.482, 'duration': 6.903}], 'summary': "New 'show' method created to display post details.", 'duration': 33.192, 'max_score': 8797.193, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE8797193.jpg'}, {'end': 9125.521, 'src': 'embed', 'start': 9094.713, 'weight': 1, 'content': [{'end': 9097.674, 'text': "And let's keep chipping away at these different functionalities.", 'start': 9094.713, 'duration': 2.961}, {'end': 9099.195, 'text': "So we've made a lot of great progress.", 'start': 9097.794, 'duration': 1.401}, {'end': 9101.376, 'text': "So we're now able to add posts.", 'start': 9099.215, 'duration': 2.161}, {'end': 9107.817, 'text': 'And of course, if we created another user, we could also create more posts for that user.', 'start': 9101.836, 'duration': 5.981}, {'end': 9109.138, 'text': "So that's great.", 'start': 9108.458, 'duration': 0.68}, {'end': 9113.338, 'text': "Now one thing we're unable to do right now is edit these fields.", 'start': 9109.498, 'duration': 3.84}, {'end': 9120, 'text': "As a matter of fact, this image right here is also a profile image that we're going to want to upload and all of that.", 'start': 9113.659, 'duration': 6.341}, {'end': 9121.28, 'text': "So let's do that.", 'start': 9120.48, 'duration': 0.8}, {'end': 9125.521, 'text': "Now, let's do a edit view for our user.", 'start': 9121.34, 'duration': 4.181}], 'summary': 'Significant progress made, able to add posts and users, working on edit functionalities.', 'duration': 30.808, 'max_score': 9094.713, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE9094713.jpg'}, {'end': 9499.008, 'src': 'embed', 'start': 9469.963, 'weight': 2, 'content': [{'end': 9472.304, 'text': 'and that is going to hit the update action.', 'start': 9469.963, 'duration': 2.341}, {'end': 9474.524, 'text': "So we've changed that in both places.", 'start': 9472.924, 'duration': 1.6}, {'end': 9476.505, 'text': 'And now we have our route.', 'start': 9475.164, 'duration': 1.341}, {'end': 9478.225, 'text': 'So this will show the form.', 'start': 9476.885, 'duration': 1.34}, {'end': 9482.886, 'text': 'And this will actually do the process of updating our record.', 'start': 9478.705, 'duration': 4.181}, {'end': 9485.426, 'text': "Now we don't have that update just yet.", 'start': 9483.466, 'duration': 1.96}, {'end': 9487.767, 'text': "And that's okay, we're still working on the form.", 'start': 9485.646, 'duration': 2.121}, {'end': 9490.347, 'text': "So let's change the title to edit profile.", 'start': 9488.207, 'duration': 2.14}, {'end': 9493.047, 'text': "And let's see what we need here.", 'start': 9491.827, 'duration': 1.22}, {'end': 9495.588, 'text': "Well, we're going to have a label for title.", 'start': 9493.207, 'duration': 2.381}, {'end': 9499.008, 'text': "And we'll say, title right here, title.", 'start': 9496.208, 'duration': 2.8}], 'summary': 'Modifying routes and form for profile update.', 'duration': 29.045, 'max_score': 9469.963, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE9469963.jpg'}], 'start': 8323.906, 'title': 'Laravel web development', 'summary': 'Covers adding a fourth post, integrating the intervention image library, creating a show view for a post, and implementing user posts and profile edit functionality in laravel. it also includes the implementation of a patch request in a form action for updating user profile information.', 'chapters': [{'end': 8363.446, 'start': 8323.906, 'title': 'Adding fourth post and styling progress', 'summary': 'Describes adding a fourth post, adjusting spacing, and ensuring content fits into a square as progress is made in coding.', 'duration': 39.54, 'highlights': ['Adding a fourth post to the layout.', 'Adjusting spacing with padding at the bottom of each post.', 'Ensuring that all content fits into a square.']}, {'end': 8698.961, 'start': 8363.986, 'title': 'Integrating intervention image library', 'summary': 'Covers the integration of the intervention image library into laravel using composer, enabling automatic discovery and the resizing of images to fit a 1200 by 1200 square, resulting in improved image presentation and functionality.', 'duration': 334.975, 'highlights': ['The Intervention Image library is integrated into Laravel using Composer, allowing for automatic discovery and dependency management.', 'The library allows for the resizing and fitting of images into a 1200 by 1200 square, improving image presentation.', "The process involves using the 'fit' method which wraps the image around the Intervention class and fits it to a 1200 by 1200 square."]}, {'end': 9044.975, 'start': 8699.322, 'title': 'Creating show view for post', 'summary': 'Discusses creating a show view for a post in a php file, demonstrating the process of creating routes, controllers, views, and implementing route model binding in laravel, which automatically fetches the resource and handles error responses.', 'duration': 345.653, 'highlights': ['Implementing route model binding in Laravel', 'Creating show method in the post controller', 'Creating routes for showing a post']}, {'end': 9357.213, 'start': 9045.155, 'title': 'Creating user posts and profile edit functionality', 'summary': 'Describes the process of creating user posts and adding profile edit functionality, including the ability to display posts, create new posts, and implement an edit profile link. the tutorial also mentions the introduction of roles to restrict access to certain parts of the application.', 'duration': 312.058, 'highlights': ['The tutorial also mentions the introduction of roles to restrict access to certain parts of the application.', 'The chapter describes the process of creating user posts and adding profile edit functionality, including the ability to display posts, create new posts, and implement an edit profile link.', 'The tutorial mentions the process of creating user posts and adding profile edit functionality, indicating a focus on user interaction and profile management.']}, {'end': 9874.464, 'start': 9357.773, 'title': 'Implementing patch request in form action', 'summary': "Discusses the implementation of a patch request in a form action, tricking browsers to support patch and delete requests, and the validation of form data including url format, with the demonstration of updating user's profile information.", 'duration': 516.691, 'highlights': ['The chapter discusses the implementation of a patch request in a form action', 'Tricking browsers to support patch and delete requests', 'Validation of form data including URL format', "Demonstration of updating user's profile information"]}], 'duration': 1550.558, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE8323906.jpg', 'highlights': ['Integrating Intervention Image library for automatic image resizing and fitting into a 1200 by 1200 square', 'Creating user posts, profile edit functionality, and roles to restrict access', 'Implementing a patch request in a form action for updating user profile information', 'Implementing route model binding and creating show method in the post controller', 'Adding a fourth post to the layout and adjusting spacing for content presentation']}, {'end': 10937.439, 'segs': [{'end': 9921.897, 'src': 'embed', 'start': 9874.844, 'weight': 4, 'content': [{'end': 9878.366, 'text': "We're not just passing in the entire request into the update.", 'start': 9874.844, 'duration': 3.522}, {'end': 9880.567, 'text': "So let's go back and hit refresh.", 'start': 9878.886, 'duration': 1.681}, {'end': 9883.456, 'text': 'with any luck, we change it.', 'start': 9881.895, 'duration': 1.561}, {'end': 9884.617, 'text': 'And sure enough, we did.', 'start': 9883.596, 'duration': 1.021}, {'end': 9886.158, 'text': "Alright, let's change the title.", 'start': 9885.217, 'duration': 0.941}, {'end': 9888.8, 'text': 'So cool title two, and then description.', 'start': 9886.178, 'duration': 2.622}, {'end': 9891.862, 'text': 'More, for example, save profile.', 'start': 9889.4, 'duration': 2.462}, {'end': 9894.684, 'text': 'Yep, cool title to description more.', 'start': 9892.282, 'duration': 2.402}, {'end': 9896.765, 'text': 'Great So that is awesome.', 'start': 9895.264, 'duration': 1.501}, {'end': 9898.506, 'text': 'But this brings us to the next point.', 'start': 9896.865, 'duration': 1.641}, {'end': 9900.708, 'text': "We'll talk about the image in just a second.", 'start': 9898.726, 'duration': 1.982}, {'end': 9905.231, 'text': "But check this out, I'm going to open up this in an incognito window.", 'start': 9900.768, 'duration': 4.463}, {'end': 9908.733, 'text': "And in this incognito window, I'm going to visit this profile.", 'start': 9905.491, 'duration': 3.242}, {'end': 9914.742, 'text': 'And even though I am not logged in, we are still able to edit the profile.', 'start': 9909.313, 'duration': 5.429}, {'end': 9921.897, 'text': 'As a matter of fact, if I hit edit profile, and I tried to save the profile, I technically could do that.', 'start': 9915.403, 'duration': 6.494}], 'summary': 'Updating request led to successful changes. profile editing possible without logging in.', 'duration': 47.053, 'max_score': 9874.844, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE9874844.jpg'}, {'end': 10040.204, 'src': 'embed', 'start': 9972.792, 'weight': 0, 'content': [{'end': 9976.395, 'text': 'And that is that you are only grabbing the authenticated user.', 'start': 9972.792, 'duration': 3.603}, {'end': 9979.697, 'text': "And it doesn't matter what they're giving you through the query.", 'start': 9976.715, 'duration': 2.982}, {'end': 9985.581, 'text': 'So we are going to protect us with a policy, but I still want this in place as an extra layer of protection.', 'start': 9980.037, 'duration': 5.544}, {'end': 9987.061, 'text': "So let's go back to Chrome.", 'start': 9986.061, 'duration': 1}, {'end': 9989.642, 'text': "And I'm going to try to edit this profile one more time.", 'start': 9987.401, 'duration': 2.241}, {'end': 9999.666, 'text': 'And when I hit save profile, it fails, of course, it is not able to grab profile, because that user does not have authorization to do that.', 'start': 9990.362, 'duration': 9.304}, {'end': 10003.507, 'text': "So now we've added a little extra layer of protection on that.", 'start': 10000.006, 'duration': 3.501}, {'end': 10011.352, 'text': "So with that, it's time for us to start tackling a policy, because this edit profile should not even be showing.", 'start': 10004.207, 'duration': 7.145}, {'end': 10015.675, 'text': 'Because if you are not the correct user, then that should not be showing.', 'start': 10011.793, 'duration': 3.882}, {'end': 10021.36, 'text': 'So when we open that in an incognito window, or as a different user, you should not be able to do that.', 'start': 10015.715, 'duration': 5.645}, {'end': 10024.181, 'text': 'So for that we use policies.', 'start': 10022, 'duration': 2.181}, {'end': 10032.302, 'text': 'So policies are a very simple way for us to restrict what a user can or cannot do with a particular resource.', 'start': 10024.541, 'duration': 7.761}, {'end': 10035.823, 'text': 'Now policies are associated to a specific model.', 'start': 10032.963, 'duration': 2.86}, {'end': 10040.204, 'text': "So in our case, we can say we're going to do a policy for the profile.", 'start': 10036.183, 'duration': 4.021}], 'summary': 'Implementing policies to restrict user access and adding an extra layer of protection for profile editing.', 'duration': 67.412, 'max_score': 9972.792, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE9972792.jpg'}, {'end': 10241.927, 'src': 'embed', 'start': 10214.693, 'weight': 2, 'content': [{'end': 10217.894, 'text': "Nope, you can't do that says this action is unauthorized.", 'start': 10214.693, 'duration': 3.201}, {'end': 10220.455, 'text': 'So we are properly actually doing that.', 'start': 10218.295, 'duration': 2.16}, {'end': 10221.556, 'text': "So that's great.", 'start': 10220.936, 'duration': 0.62}, {'end': 10226.458, 'text': 'What else do we need to protect? Well, we actually need to protect other routes in this same controller.', 'start': 10221.696, 'duration': 4.762}, {'end': 10227.818, 'text': 'So let me copy this.', 'start': 10226.958, 'duration': 0.86}, {'end': 10235.262, 'text': "So the update, this should also be controlled, you cannot hit this unless you're authorized to update.", 'start': 10228.399, 'duration': 6.863}, {'end': 10239.163, 'text': 'So furthermore, we do have that lingering link.', 'start': 10235.902, 'duration': 3.261}, {'end': 10240.664, 'text': "So let's go to the profile.", 'start': 10239.463, 'duration': 1.201}, {'end': 10241.927, 'text': 'there we are.', 'start': 10241.547, 'duration': 0.38}], 'summary': 'Unauthorized action was blocked; update route protected; profile accessed.', 'duration': 27.234, 'max_score': 10214.693, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE10214693.jpg'}, {'end': 10536.954, 'src': 'embed', 'start': 10509.019, 'weight': 7, 'content': [{'end': 10515.264, 'text': 'what we want to do is really be able to edit the profile and start to use this profile image right here.', 'start': 10509.019, 'duration': 6.245}, {'end': 10519.547, 'text': "So how would we go about doing that? So let's go into the profile controller.", 'start': 10515.804, 'duration': 3.743}, {'end': 10522.449, 'text': "And let's check out this update.", 'start': 10519.567, 'duration': 2.882}, {'end': 10528.153, 'text': "So right now, we are grabbing the image, but we're not really doing anything with it at all.", 'start': 10522.729, 'duration': 5.424}, {'end': 10530.975, 'text': "So let's do something, let's do the following.", 'start': 10528.773, 'duration': 2.202}, {'end': 10536.954, 'text': "If the request has an image, then we're going to do something special.", 'start': 10531.735, 'duration': 5.219}], 'summary': 'Enhance profile editing process by implementing image upload functionality.', 'duration': 27.935, 'max_score': 10509.019, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE10509019.jpg'}, {'end': 10702.022, 'src': 'embed', 'start': 10675.074, 'weight': 8, 'content': [{'end': 10680.256, 'text': "I'm going to die and dump very quickly here and say data, so that you can see what we have under data.", 'start': 10675.074, 'duration': 5.182}, {'end': 10682.016, 'text': 'So let me choose an image.', 'start': 10680.896, 'duration': 1.12}, {'end': 10684.397, 'text': "And I'm going to hit save profile.", 'start': 10683.216, 'duration': 1.181}, {'end': 10686.777, 'text': "So it's saying that image is not found.", 'start': 10685.077, 'duration': 1.7}, {'end': 10689.098, 'text': 'Of course, we did not import image.', 'start': 10687.338, 'duration': 1.76}, {'end': 10697.681, 'text': "So we need to import image, import that class, that's going to be intervention image, facades image, and that's being imported up here at the top.", 'start': 10689.618, 'duration': 8.063}, {'end': 10699.161, 'text': 'Hit refresh.', 'start': 10698.561, 'duration': 0.6}, {'end': 10702.022, 'text': 'Image source not readable.', 'start': 10700.601, 'duration': 1.421}], 'summary': 'Troubleshooting image import and readability issues in code.', 'duration': 26.948, 'max_score': 10675.074, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE10675074.jpg'}, {'end': 10847.016, 'src': 'embed', 'start': 10818.089, 'weight': 6, 'content': [{'end': 10820.231, 'text': 'But we are also about to run into a different issue.', 'start': 10818.089, 'duration': 2.142}, {'end': 10827.119, 'text': 'And that is that remember that when you create your user, we are not creating a profile for them.', 'start': 10820.732, 'duration': 6.387}, {'end': 10831.364, 'text': 'So when we get to this page, technically, there is no profile for them.', 'start': 10827.64, 'duration': 3.724}, {'end': 10837.329, 'text': 'So as part of our registration, we really need to create kind of a blank profile for our users.', 'start': 10831.624, 'duration': 5.705}, {'end': 10840.511, 'text': 'That way, they can start using it and they can edit it.', 'start': 10837.849, 'duration': 2.662}, {'end': 10847.016, 'text': "But right now, because there is no record for that user on the profiles table, this is what's happening.", 'start': 10840.691, 'duration': 6.325}], 'summary': 'Issue: no user profile created during registration process, causing problems.', 'duration': 28.927, 'max_score': 10818.089, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE10818089.jpg'}], 'start': 9874.844, 'title': 'User profile management and security measures', 'summary': 'Covers updating user profiles, addressing a security flaw allowing non-logged in users to edit profiles, implementing policy protection and restriction for improved security and access control, and updating profile images in a php application.', 'chapters': [{'end': 9921.897, 'start': 9874.844, 'title': 'Update profile and security issue', 'summary': 'Covers the process of updating a user profile, including changing the title and description, and highlights a security flaw allowing non-logged in users to edit and save profiles.', 'duration': 47.053, 'highlights': ['Non-logged in users can edit and save profiles, presenting a security vulnerability.', 'Demonstrating the ability to edit and save profiles in an incognito window as a non-logged in user.', 'Updating user profile by changing the title and description.']}, {'end': 10488.399, 'start': 9922.887, 'title': 'Policy protection and restriction', 'summary': 'Details the implementation of policy protection and restriction by adding an extra layer of protection to user inputs, creating policies to restrict user actions, and controlling routes based on user authorization, resulting in improved security and access control.', 'duration': 565.512, 'highlights': ['Implementing an extra layer of protection by only grabbing authenticated user inputs, rather than trusting user-provided data, to prevent unauthorized user actions.', 'Creating policies to restrict user actions on a specific resource, such as the profile, by associating policies to a specific model and defining methods to control user authorization.', 'Controlling routes based on user authorization by authorizing specific actions on resources, such as updating a profile, and using blade directives to restrict access to certain links based on user privileges.']}, {'end': 10937.439, 'start': 10488.739, 'title': 'Updating profile image in php', 'summary': 'Covers updating the profile image in a php application, including adding functionality to edit and save new profile images, handling user actions without a new image, and creating a blank profile for new users using eloquent model events.', 'duration': 448.7, 'highlights': ['Creating a blank profile for new users using eloquent model events', 'Updating the profile image functionality in a PHP application', 'Importing the intervention image class and handling image path']}], 'duration': 1062.595, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE9874844.jpg', 'highlights': ['Implementing an extra layer of protection by only grabbing authenticated user inputs, rather than trusting user-provided data, to prevent unauthorized user actions.', 'Creating policies to restrict user actions on a specific resource, such as the profile, by associating policies to a specific model and defining methods to control user authorization.', 'Controlling routes based on user authorization by authorizing specific actions on resources, such as updating a profile, and using blade directives to restrict access to certain links based on user privileges.', 'Non-logged in users can edit and save profiles, presenting a security vulnerability.', 'Demonstrating the ability to edit and save profiles in an incognito window as a non-logged in user.', 'Updating user profile by changing the title and description.', 'Creating a blank profile for new users using eloquent model events', 'Updating the profile image functionality in a PHP application', 'Importing the intervention image class and handling image path']}, {'end': 11934.241, 'segs': [{'end': 11005.648, 'src': 'embed', 'start': 10958.45, 'weight': 0, 'content': [{'end': 10962.752, 'text': 'Now the nice thing with this closure is that it will actually give us the created model.', 'start': 10958.45, 'duration': 4.302}, {'end': 10965.193, 'text': 'So we can accept that as user.', 'start': 10963.232, 'duration': 1.961}, {'end': 10968.435, 'text': 'And then we could do whatever we need to do to make that happen.', 'start': 10965.753, 'duration': 2.682}, {'end': 10974.998, 'text': "So of course, as we've learned before, the easiest way of creating a profile is through the relationship.", 'start': 10968.995, 'duration': 6.003}, {'end': 10978.879, 'text': 'That way, the user ID gets set up for us and everything else.', 'start': 10975.078, 'duration': 3.801}, {'end': 10985.953, 'text': "So we can simply say user profile, create And really, that's it.", 'start': 10979.42, 'duration': 6.533}, {'end': 10992.258, 'text': 'Because if you recall, everything in there is nullable, except for the user ID.', 'start': 10986.013, 'duration': 6.245}, {'end': 10995.64, 'text': 'However, maybe we should just make some defaults.', 'start': 10993.058, 'duration': 2.582}, {'end': 10999.583, 'text': "So for title, let's go ahead and maybe just use their username.", 'start': 10995.92, 'duration': 3.663}, {'end': 11005.648, 'text': "So let's just say title will be the user username.", 'start': 10999.783, 'duration': 5.865}], 'summary': 'Using closure to create a model and set up user profile easily with nullable fields and default values.', 'duration': 47.198, 'max_score': 10958.45, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE10958450.jpg'}, {'end': 11113.248, 'src': 'embed', 'start': 11059.627, 'weight': 1, 'content': [{'end': 11064.648, 'text': 'And now all of this has kind of led to us being able to have a profile image, because, remember,', 'start': 11059.627, 'duration': 5.021}, {'end': 11067.909, 'text': 'that was the actual reason why we needed to refresh our database.', 'start': 11064.648, 'duration': 3.261}, {'end': 11070.01, 'text': "So let's go ahead and add that image there.", 'start': 11068.349, 'duration': 1.661}, {'end': 11071.57, 'text': 'Hit save profile.', 'start': 11070.55, 'duration': 1.02}, {'end': 11073.391, 'text': 'And yes, it did work.', 'start': 11072.111, 'duration': 1.28}, {'end': 11077.852, 'text': 'However, we still have that hard coded image in our profile view.', 'start': 11073.791, 'duration': 4.061}, {'end': 11079.193, 'text': "So let's take a look at that.", 'start': 11078.072, 'duration': 1.121}, {'end': 11092.976, 'text': "Now Let's go to the profile slash index And this image right here, we can now replace that with user profile image.", 'start': 11079.253, 'duration': 13.723}, {'end': 11103.002, 'text': 'And of course, we still need to go into slash storage slash whatever the profile image is back to Chrome, refresh.', 'start': 11094.177, 'duration': 8.825}, {'end': 11103.922, 'text': 'And there we go.', 'start': 11103.422, 'duration': 0.5}, {'end': 11105.823, 'text': 'So that image is being pulled up.', 'start': 11104.282, 'duration': 1.541}, {'end': 11112.067, 'text': 'Now, of course, we do need to give it just a class of w 100 to fix that with issue.', 'start': 11106.404, 'duration': 5.663}, {'end': 11113.248, 'text': 'And there we go.', 'start': 11112.587, 'duration': 0.661}], 'summary': 'Database refreshed to add user profile image, fixed hard-coded image in profile view.', 'duration': 53.621, 'max_score': 11059.627, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE11059627.jpg'}, {'end': 11230.706, 'src': 'embed', 'start': 11202.236, 'weight': 5, 'content': [{'end': 11205.858, 'text': "So let's add slash storage, slash, and then that.", 'start': 11202.236, 'duration': 3.622}, {'end': 11212.073, 'text': "And let's add a class of width of 100.", 'start': 11206.559, 'duration': 5.514}, {'end': 11212.633, 'text': "let's go back here.", 'start': 11212.073, 'duration': 0.56}, {'end': 11213.634, 'text': 'There we go.', 'start': 11213.294, 'duration': 0.34}, {'end': 11214.855, 'text': "So we're getting that.", 'start': 11214.074, 'duration': 0.781}, {'end': 11216.416, 'text': "Now let's just make that rounded.", 'start': 11215.055, 'duration': 1.361}, {'end': 11218.858, 'text': "That's going to be a class of rounded circle.", 'start': 11216.856, 'duration': 2.002}, {'end': 11221.86, 'text': 'Nice There we are.', 'start': 11220.979, 'duration': 0.881}, {'end': 11224.802, 'text': 'Alright, what else do we need on that? Well, we need the username.', 'start': 11222.36, 'duration': 2.442}, {'end': 11227.223, 'text': "So let's create another div in here.", 'start': 11225.362, 'duration': 1.861}, {'end': 11230.706, 'text': 'And maybe have that under an h5.', 'start': 11228.124, 'duration': 2.582}], 'summary': 'Adding storage, setting width to 100, creating rounded circle class, and adding username in h5.', 'duration': 28.47, 'max_score': 11202.236, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE11202236.jpg'}, {'end': 11315.699, 'src': 'embed', 'start': 11284.675, 'weight': 6, 'content': [{'end': 11286.056, 'text': 'And that should fix it for us.', 'start': 11284.675, 'duration': 1.381}, {'end': 11287.037, 'text': 'There we go.', 'start': 11286.617, 'duration': 0.42}, {'end': 11291.02, 'text': "Alright, so now let's add a little bit of padding to the right of the image.", 'start': 11287.698, 'duration': 3.322}, {'end': 11294.923, 'text': 'So say class, padding, right, maybe three.', 'start': 11291.801, 'duration': 3.122}, {'end': 11298.271, 'text': "Yeah, that's looking good.", 'start': 11297.27, 'duration': 1.001}, {'end': 11301.172, 'text': 'So we have that.', 'start': 11298.891, 'duration': 2.281}, {'end': 11305.414, 'text': 'And it looks like it should be bold, and maybe slightly smaller.', 'start': 11301.992, 'duration': 3.422}, {'end': 11308.495, 'text': "So maybe let's just put a paragraph tag here.", 'start': 11306.194, 'duration': 2.301}, {'end': 11315.699, 'text': "And let's give it a class of font bold first for font weight bold.", 'start': 11309.076, 'duration': 6.623}], 'summary': 'Adjusting image padding to the right by three, adding bold and smaller font size.', 'duration': 31.024, 'max_score': 11284.675, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE11284675.jpg'}, {'end': 11680.406, 'src': 'embed', 'start': 11652.787, 'weight': 7, 'content': [{'end': 11655.809, 'text': "And this is what we're going to call every time that we need that profile image.", 'start': 11652.787, 'duration': 3.022}, {'end': 11662.856, 'text': 'So this needs to return either the default or the image that was actually provided by the user.', 'start': 11656.51, 'duration': 6.346}, {'end': 11664.357, 'text': 'So how can we check that?', 'start': 11663.296, 'duration': 1.061}, {'end': 11667.22, 'text': 'Well, we could say this image.', 'start': 11664.397, 'duration': 2.823}, {'end': 11672.085, 'text': 'remember, this is the model, so we can access any of their properties by just calling this image.', 'start': 11667.22, 'duration': 4.865}, {'end': 11680.406, 'text': "So if this image is set, then we're going to return slash storage slash, and then this image.", 'start': 11672.685, 'duration': 7.721}], 'summary': 'Create a function to return the default or user-provided profile image.', 'duration': 27.619, 'max_score': 11652.787, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE11652787.jpg'}, {'end': 11885.542, 'src': 'embed', 'start': 11852.703, 'weight': 8, 'content': [{'end': 11856.646, 'text': "So why is this happening? Well, let's take a look at the code snippet that we got right here.", 'start': 11852.703, 'duration': 3.943}, {'end': 11864.294, 'text': "So we are always assuming that there's going to be this image path, but the image path may not be set.", 'start': 11857.287, 'duration': 7.007}, {'end': 11867.997, 'text': "And if it's not set, it just means that there was no image in the request.", 'start': 11864.975, 'duration': 3.022}, {'end': 11872.919, 'text': 'However, down here, we are always assuming that image path is set.', 'start': 11868.638, 'duration': 4.281}, {'end': 11874.379, 'text': "So let's fix that.", 'start': 11873.499, 'duration': 0.88}, {'end': 11876.16, 'text': 'Obviously, the problem is right here.', 'start': 11874.499, 'duration': 1.661}, {'end': 11885.542, 'text': "Now I can't say something like just say no, because then whenever there is an image and no new image is passed,", 'start': 11876.78, 'duration': 8.762}], 'summary': 'Fixing assumption of always having an image path in the code snippet.', 'duration': 32.839, 'max_score': 11852.703, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE11852703.jpg'}], 'start': 10938.02, 'title': 'User profile management and styling', 'summary': 'Covers automated user profile creation and management, including default values and profile images. it also demonstrates styling a user profile with bootstrap, including classes for width, rounded circle, image size, alignment, padding, text weight, and clickable links.', 'chapters': [{'end': 11201.975, 'start': 10938.02, 'title': 'User profile creation and management', 'summary': 'Covers the automated creation of user profiles upon user creation, including setting default values and handling profile images, resulting in a streamlined and efficient user management system.', 'duration': 263.955, 'highlights': ['The closure used upon user creation provides access to the created model, enabling automated profile creation and management.', 'Creating a profile through a relationship ensures that the user ID is set up automatically, streamlining the profile creation process.', 'Setting default values, such as using the username as the default title for the profile, enhances the user experience and ensures that profiles are not left blank.', 'Efficiently managing profile images through automated retrieval and display, including handling image updates and ensuring a seamless user experience.']}, {'end': 11535.21, 'start': 11202.236, 'title': 'Styling user profile', 'summary': 'Demonstrates the step-by-step process of styling a user profile, including adding classes for width, rounded circle, adjusting image size, aligning elements, adding padding, changing text weight, and creating clickable links with bootstrap.', 'duration': 332.974, 'highlights': ['The chapter demonstrates the step-by-step process of styling a user profile', 'Adding classes for width, rounded circle, and adjusting image size', 'Aligning elements and adding padding', 'Changing text weight and creating clickable links with Bootstrap']}, {'end': 11934.241, 'start': 11536.431, 'title': 'Profile image update and defaulting', 'summary': 'Discusses updating profile images, defaulting to a placeholder image, and handling potential issues, with a focus on creating a method to return a default image and resolving an undefined variable error.', 'duration': 397.81, 'highlights': ['Creating a method to return a default image', 'Defaulting to a placeholder image when no image is available', 'Resolving an undefined variable error related to image path']}], 'duration': 996.221, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE10938020.jpg', 'highlights': ['Creating a profile through a relationship ensures automatic user ID setup - streamlining profile creation.', 'Efficiently managing profile images through automated retrieval and display.', 'Setting default values, like using the username as the default title, enhances user experience.', 'The closure used upon user creation provides access to the created model for automated profile management.', 'Demonstrating step-by-step process of styling a user profile with Bootstrap.', 'Adding classes for width, rounded circle, and adjusting image size.', 'Aligning elements, adding padding, changing text weight, and creating clickable links with Bootstrap.', 'Creating a method to return a default image and defaulting to a placeholder image when no image is available.', 'Resolving an undefined variable error related to image path.']}, {'end': 13982.143, 'segs': [{'end': 12013.696, 'src': 'embed', 'start': 11983.926, 'weight': 8, 'content': [{'end': 11985.307, 'text': "We've worked on this quite a bit.", 'start': 11983.926, 'duration': 1.381}, {'end': 11988.027, 'text': 'We are making fantastic progress on this.', 'start': 11985.887, 'duration': 2.14}, {'end': 11991.008, 'text': 'Up next, I do want to handle the followers.', 'start': 11988.667, 'duration': 2.341}, {'end': 11992.968, 'text': "That's kind of the next thing on Instagram.", 'start': 11991.048, 'duration': 1.92}, {'end': 11998.09, 'text': 'When you have a couple of different users, then of course, we want the ability to follow them.', 'start': 11993.649, 'duration': 4.441}, {'end': 12003.271, 'text': 'Now if you remember back here, there is a follow button in our show view.', 'start': 11998.69, 'duration': 4.581}, {'end': 12009.754, 'text': 'And there should also be a follow button in our actual profile.', 'start': 12004.171, 'duration': 5.583}, {'end': 12011.695, 'text': "So here it is, here's that follow button.", 'start': 12009.894, 'duration': 1.801}, {'end': 12013.696, 'text': "And we don't have one right now.", 'start': 12012.355, 'duration': 1.341}], 'summary': 'Making fantastic progress on adding follow buttons for different users on instagram.', 'duration': 29.77, 'max_score': 11983.926, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE11983926.jpg'}, {'end': 12154.885, 'src': 'embed', 'start': 12126.795, 'weight': 1, 'content': [{'end': 12130.096, 'text': "So this is going to be a cool and different approach that we're going to take for this.", 'start': 12126.795, 'duration': 3.301}, {'end': 12134.358, 'text': "So we're going to convert this follow button into a view component.", 'start': 12130.616, 'duration': 3.742}, {'end': 12142.621, 'text': 'And the reason again, why I want to turn this into a view component is because this should not require you to refresh the entire page.', 'start': 12134.818, 'duration': 7.803}, {'end': 12147.382, 'text': 'But rather, when you click on it, I just want to talk to the server and say, Hey, follow that profile.', 'start': 12142.741, 'duration': 4.641}, {'end': 12149.203, 'text': "And then we're going to get some feedback.", 'start': 12147.782, 'duration': 1.421}, {'end': 12154.885, 'text': "And then if you click on it, again, it's basically going to toggle that and say on follow that person.", 'start': 12149.603, 'duration': 5.282}], 'summary': 'Convert follow button into a view component to streamline user interactions and minimize page refresh.', 'duration': 28.09, 'max_score': 12126.795, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE12126795.jpg'}, {'end': 12367.057, 'src': 'embed', 'start': 12331.071, 'weight': 9, 'content': [{'end': 12331.431, 'text': 'There it is.', 'start': 12331.071, 'duration': 0.36}, {'end': 12333.313, 'text': 'So Laravel Mix compiled.', 'start': 12331.591, 'duration': 1.722}, {'end': 12336.256, 'text': 'Go back, refresh, and there it is.', 'start': 12333.853, 'duration': 2.403}, {'end': 12337.036, 'text': 'Follow me now.', 'start': 12336.496, 'duration': 0.54}, {'end': 12338.377, 'text': 'How cool is that?', 'start': 12337.737, 'duration': 0.64}, {'end': 12341.62, 'text': "So while you're running the NPM, run watch.", 'start': 12338.758, 'duration': 2.862}, {'end': 12347.644, 'text': 'every time you save a file, it will automatically compile those assets for you and present them to you on the browser.', 'start': 12341.62, 'duration': 6.024}, {'end': 12355.429, 'text': 'So the first thing that I want to do with this button is that whenever I click on it, then of course, I do want to create some sort of action.', 'start': 12348.124, 'duration': 7.305}, {'end': 12358.891, 'text': 'So basically, we need to be watching for a click on this button.', 'start': 12355.609, 'duration': 3.282}, {'end': 12367.057, 'text': 'And whenever that click happens, we need to reach out into our server and do something right create that connection between two users.', 'start': 12359.311, 'duration': 7.746}], 'summary': 'Using laravel mix, npm watch automatically compiles assets. creating action on button click to establish connection between users.', 'duration': 35.986, 'max_score': 12331.071, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE12331071.jpg'}, {'end': 12420.107, 'src': 'embed', 'start': 12392.003, 'weight': 2, 'content': [{'end': 12398.021, 'text': "Right? And let's just for now, let's just alert inside just so that we could see that that is working.", 'start': 12392.003, 'duration': 6.018}, {'end': 12400.082, 'text': 'Let me hit refresh, click that.', 'start': 12398.242, 'duration': 1.84}, {'end': 12402.143, 'text': 'And sure enough, we are inside.', 'start': 12400.422, 'duration': 1.721}, {'end': 12403.463, 'text': "See, we're hitting that method.", 'start': 12402.183, 'duration': 1.28}, {'end': 12405.283, 'text': "All right, that's pretty good.", 'start': 12404.323, 'duration': 0.96}, {'end': 12408.424, 'text': 'So this follow user needs to reach into our server.', 'start': 12405.423, 'duration': 3.001}, {'end': 12414.786, 'text': 'How do we reach into our server? Well, check this out level actually ships with Axios installed.', 'start': 12408.964, 'duration': 5.822}, {'end': 12420.107, 'text': 'And Axios is a cool library that allows you to make API calls extremely easy.', 'start': 12415.346, 'duration': 4.761}], 'summary': 'Using axios, we make api calls easily to reach the server and execute the method successfully.', 'duration': 28.104, 'max_score': 12392.003, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE12392003.jpg'}, {'end': 12696.676, 'src': 'embed', 'start': 12664.312, 'weight': 5, 'content': [{'end': 12665.512, 'text': "Let's visit a different profile.", 'start': 12664.312, 'duration': 1.2}, {'end': 12667.634, 'text': "Let's go to to hit that.", 'start': 12665.572, 'duration': 2.062}, {'end': 12668.434, 'text': 'There we go.', 'start': 12668.034, 'duration': 0.4}, {'end': 12669.435, 'text': 'Free Codegram.', 'start': 12668.715, 'duration': 0.72}, {'end': 12672.858, 'text': 'So we are successfully fetching the correct user.', 'start': 12669.815, 'duration': 3.043}, {'end': 12682.964, 'text': "Okay, so now that we're all set up, how do we actually connect a profile to users, what we're going to explore is a many to many relationship.", 'start': 12673.792, 'duration': 9.172}, {'end': 12690.213, 'text': 'Up until this point, we talked about a one to one relationship, we talked about one to many, and now a many to many.', 'start': 12683.425, 'duration': 6.788}, {'end': 12696.676, 'text': 'because a profile can have many followers, and a user can follow many profiles.', 'start': 12690.734, 'duration': 5.942}], 'summary': 'Exploring many-to-many relationship between profiles and users.', 'duration': 32.364, 'max_score': 12664.312, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE12664312.jpg'}, {'end': 12860.817, 'src': 'embed', 'start': 12829.066, 'weight': 3, 'content': [{'end': 12833.119, 'text': 'PHP artisan, And there we go.', 'start': 12829.066, 'duration': 4.053}, {'end': 12835.921, 'text': 'So now we have that profile users pivot table.', 'start': 12833.319, 'duration': 2.602}, {'end': 12837.902, 'text': "Let's set up our relationships.", 'start': 12836.502, 'duration': 1.4}, {'end': 12839.584, 'text': "Let's start with the user model.", 'start': 12838.263, 'duration': 1.321}, {'end': 12843.106, 'text': 'So our user model has posts, and it has profiles.', 'start': 12840.084, 'duration': 3.022}, {'end': 12852.052, 'text': "And now it's going to have maybe following that's what I'm thinking I'm going to call the method because a user is going to be following a profile.", 'start': 12843.526, 'duration': 8.526}, {'end': 12854.974, 'text': "So let's go ahead and call it following.", 'start': 12852.572, 'duration': 2.402}, {'end': 12860.817, 'text': 'And how do we return this? Well, we need to return this, it belongs to many.', 'start': 12855.894, 'duration': 4.923}], 'summary': "Setting up relationships in the user model for posts, profiles, and 'following' method.", 'duration': 31.751, 'max_score': 12829.066, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE12829066.jpg'}, {'end': 13210.356, 'src': 'embed', 'start': 13178.114, 'weight': 7, 'content': [{'end': 13181.376, 'text': 'So how are we going to get that initial state?', 'start': 13178.114, 'duration': 3.262}, {'end': 13185.478, 'text': "we're going to have to somehow pass it in in this follow button.", 'start': 13181.376, 'duration': 4.102}, {'end': 13190.561, 'text': "maybe we'll just say follows, as in this particular user follows that.", 'start': 13185.478, 'duration': 5.083}, {'end': 13197.866, 'text': "And then we're going to have to basically have some sort of variable passed in from our profiles controller.", 'start': 13191.121, 'duration': 6.745}, {'end': 13199.768, 'text': "So let's go to the profiles controller.", 'start': 13198.367, 'duration': 1.401}, {'end': 13210.356, 'text': "And right here in the index, we're going to need to somehow figure out how to determine if that user follows this profile right,", 'start': 13200.448, 'duration': 9.908}], 'summary': 'To determine if a user follows a profile, a variable needs to be passed in from the profiles controller.', 'duration': 32.242, 'max_score': 13178.114, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE13178114.jpg'}, {'end': 13526.203, 'src': 'embed', 'start': 13501.576, 'weight': 6, 'content': [{'end': 13510.282, 'text': 'But I think probably the best thing we could do is just redirect the customer back to the login page, saying Hey, you know what you are not logged in.', 'start': 13501.576, 'duration': 8.706}, {'end': 13513.104, 'text': 'go ahead and log in and maybe try that action again.', 'start': 13510.282, 'duration': 2.822}, {'end': 13521.861, 'text': "So if we catch an error, And if that error is of the correct type, because we may get a 500, that's totally different.", 'start': 13513.745, 'duration': 8.116}, {'end': 13526.203, 'text': 'But we are looking for this 401, unauthorized.', 'start': 13522.461, 'duration': 3.742}], 'summary': 'Redirect customers to login page for 401 unauthorized error.', 'duration': 24.627, 'max_score': 13501.576, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE13501576.jpg'}, {'end': 13824.38, 'src': 'embed', 'start': 13800.257, 'weight': 0, 'content': [{'end': 13808.76, 'text': 'So Laravel Telescope tracks your application and it will record any activity that comes in, whether through requests or through models,', 'start': 13800.257, 'duration': 8.503}, {'end': 13809.96, 'text': 'or events or commands.', 'start': 13808.76, 'duration': 1.2}, {'end': 13812.261, 'text': 'I mean, it covers the entire thing.', 'start': 13810.06, 'duration': 2.201}, {'end': 13818.556, 'text': 'So if we look in the command section, for example, we see that we just ran a migrate command 30 seconds ago.', 'start': 13812.921, 'duration': 5.635}, {'end': 13820.02, 'text': "Let's run another command.", 'start': 13819.137, 'duration': 0.883}, {'end': 13821.744, 'text': "For example, let's just run PHP artisan.", 'start': 13820.06, 'duration': 1.684}, {'end': 13824.38, 'text': "Okay, now let's go back to telescope.", 'start': 13822.819, 'duration': 1.561}], 'summary': 'Laravel telescope records application activity, including commands, models, and events, providing comprehensive tracking.', 'duration': 24.123, 'max_score': 13800.257, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE13800257.jpg'}], 'start': 11934.941, 'title': 'Implementing follow functionality with laravel and vue', 'summary': 'Showcases fixing profile image issues, creating a follow button with vue, establishing user connections, setting up laravel migrations and models for follow functionality, updating follow status, and implementing laravel telescope for activity tracking.', 'chapters': [{'end': 12108.727, 'start': 11934.941, 'title': 'Fixing profile image and adding follow button', 'summary': 'Demonstrates fixing the profile image issue and implementing a follow button, showcasing the progress made and the upcoming task of handling followers on instagram.', 'duration': 173.786, 'highlights': ['Progress made on fixing profile image and implementing follow button', 'Upcoming task: handling followers on Instagram']}, {'end': 12347.644, 'start': 12108.967, 'title': 'Creating a follow button with vue', 'summary': 'Introduces creating a follow button using vue as a view component, allowing for server interaction without refreshing the entire page, and demonstrates live compilation using npm run watch.', 'duration': 238.677, 'highlights': ['The follow button is transformed into a view component to enable server interaction without refreshing the entire page, providing a seamless user experience.', 'Using npm run watch allows for live compilation, automatically updating the code and presenting changes in the browser, enhancing the development workflow.', 'All content in the view component needs to be wrapped in a single tag, emphasizing the structure required by Vue for components.']}, {'end': 12724.989, 'start': 12348.124, 'title': 'Creating user connection', 'summary': 'Covers the process of creating a user connection, including watching for a click event, making an api call using axios to establish a connection between users, setting up a controller to handle the connection, and exploring a many-to-many relationship for connecting profiles to users.', 'duration': 376.865, 'highlights': ['Watching for a click event and creating a method to follow a user', 'Making an API call using Axios to establish a connection between users', 'Setting up a controller to handle the user connection', 'Exploring a many-to-many relationship for connecting profiles to users']}, {'end': 13149.482, 'start': 12725.049, 'title': 'Laravel migration and model setup', 'summary': 'Explains the process of creating a migration without a model in laravel, setting up a pivot table, establishing relationships between user and profile models, and implementing the follow/unfollow functionality, including handling user authentication. it also demonstrates the usage of the toggle method to manage the relationship status.', 'duration': 424.433, 'highlights': ['The chapter explains the process of creating a migration without a model in Laravel, setting up a pivot table, and establishing relationships between user and profile models, emphasizing the alphabetical order and naming conventions. (quantifiable data: none)', 'It demonstrates the usage of the toggle method to manage the follow/unfollow functionality, including handling user authentication and providing feedback to the user. (quantifiable data: none)', "It illustrates the establishment of relationships between user and profile models, defining methods like 'following' and 'followers' to represent the connections between the two models. (quantifiable data: none)"]}, {'end': 13711.953, 'start': 13149.903, 'title': 'Updating follow status and handling authentication', 'summary': 'Discusses setting the default state for user follows, determining initial state, handling ui updates, and handling authentication errors while updating follow status, with examples and code snippets from the transcript.', 'duration': 562.05, 'highlights': ['Setting default state for user follows', 'Handling UI updates', 'Handling authentication errors']}, {'end': 13982.143, 'start': 13712.534, 'title': 'Implementing laravel telescope and redirecting after login', 'summary': 'Discusses the implementation of laravel telescope, a powerful tool that tracks various activities within the application, and then focuses on redirecting the user after a successful login in the laravel application.', 'duration': 269.609, 'highlights': ["Laravel Telescope tracks various activities within the application, such as requests, models, events, commands, scheduled jobs, exceptions, logs, dumps, and queries, providing a comprehensive overview of the application's behavior.", 'Laravel Telescope provides detailed information about requests, including status codes, headers, sessions, responses, and allows viewing full queries and requests, making it an invaluable tool for development and debugging.', "Changing the redirection after a successful login in the Laravel application to a specific route, such as removing the '/home' route and redirecting to the main domain to display the latest posts from followed users, similar to the functionality of Instagram."]}], 'duration': 2047.202, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE11934941.jpg', 'highlights': ['Laravel Telescope tracks various activities within the application, providing a comprehensive overview (relevant)', 'Creating a follow button with Vue to enable server interaction without page refresh (relevant)', 'Establishing user connections using Axios and setting up a controller (relevant)', 'Setting up Laravel migrations and models for follow functionality (relevant)', 'Implementing Laravel Telescope for activity tracking (relevant)', 'Exploring many-to-many relationship for connecting profiles to users (less relevant)', 'Handling UI updates and authentication errors (less relevant)', 'Setting default state for user follows (less relevant)', 'Upcoming task: handling followers on Instagram (less relevant)', 'Using npm run watch for live compilation and enhancing development workflow (less relevant)']}, {'end': 15903.791, 'segs': [{'end': 14009.22, 'src': 'embed', 'start': 13982.143, 'weight': 4, 'content': [{'end': 13988.266, 'text': "I do need to clean up this route, because right now it is just returning a welcome view which we're going to get rid of all together.", 'start': 13982.143, 'duration': 6.123}, {'end': 13993.95, 'text': "So what am I thinking here? Well, we actually don't even need a new controller.", 'start': 13988.947, 'duration': 5.003}, {'end': 13997.172, 'text': "Because what I'm thinking is I'm going to reuse my post controller.", 'start': 13994.41, 'duration': 2.762}, {'end': 14003.456, 'text': "And we're going to call the index method on the index method is the one that kind of shows all of the resources.", 'start': 13997.672, 'duration': 5.784}, {'end': 14006.018, 'text': 'So we just make sense to call that.', 'start': 14003.756, 'duration': 2.262}, {'end': 14009.22, 'text': "So let's move this down so that it joins all the other routes.", 'start': 14006.578, 'duration': 2.642}], 'summary': "Reuse post controller's index method for cleaning up the route.", 'duration': 27.077, 'max_score': 13982.143, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE13982143.jpg'}, {'end': 14633.719, 'src': 'embed', 'start': 14604.629, 'weight': 0, 'content': [{'end': 14608.352, 'text': 'How cool is that? One thing I do want to touch up on is this.', 'start': 14604.629, 'duration': 3.723}, {'end': 14613.084, 'text': 'if we go back here to telescope, you see this right here.', 'start': 14609.321, 'duration': 3.763}, {'end': 14619.008, 'text': 'it is basically the exact same query, over and over, but with a limit of one.', 'start': 14613.084, 'duration': 5.924}, {'end': 14621.77, 'text': 'this is what is known as an n plus one problem.', 'start': 14619.008, 'duration': 2.762}, {'end': 14630.897, 'text': "And what's actually happening is that when we load this page, let me show you when we load this page, we are fetching the user relationship,", 'start': 14622.23, 'duration': 8.667}, {'end': 14633.719, 'text': 'but we are not loading the user relationship.', 'start': 14630.897, 'duration': 2.822}], 'summary': 'Telescope query has n plus one problem, fetching user relationship without loading it.', 'duration': 29.09, 'max_score': 14604.629, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE14604629.jpg'}, {'end': 14740.62, 'src': 'embed', 'start': 14715.383, 'weight': 1, 'content': [{'end': 14723.308, 'text': 'So if we go to our profile, this section right here, right now, we are fetching that every single time the user loads it.', 'start': 14715.383, 'duration': 7.925}, {'end': 14732.034, 'text': "But I want to make use of Laravel caching, because caching and Laravel is so simple, that it's almost really just a no brainer to use it.", 'start': 14723.949, 'duration': 8.085}, {'end': 14738.959, 'text': 'So right now, instead of every time I load the page, we go ahead and calculate each one of these fields.', 'start': 14732.594, 'duration': 6.365}, {'end': 14740.62, 'text': 'for my application.', 'start': 14739.719, 'duration': 0.901}], 'summary': 'Implementing laravel caching to optimize profile loading and calculations.', 'duration': 25.237, 'max_score': 14715.383, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE14715383.jpg'}, {'end': 15037.112, 'src': 'embed', 'start': 15008.142, 'weight': 2, 'content': [{'end': 15010.763, 'text': 'So I need to do the same thing for the rest of these.', 'start': 15008.142, 'duration': 2.621}, {'end': 15015.205, 'text': "So behind the scenes, I'm going to do the exact same thing to all of these right here.", 'start': 15011.163, 'duration': 4.042}, {'end': 15016.645, 'text': 'And there we go.', 'start': 15016.025, 'duration': 0.62}, {'end': 15024.248, 'text': 'So we are now successfully caching post count, followers count, and following count for each of our users.', 'start': 15017.105, 'duration': 7.143}, {'end': 15027.049, 'text': 'So let me go ahead and refresh this.', 'start': 15024.628, 'duration': 2.421}, {'end': 15029.39, 'text': 'So we can see it in action in telescope.', 'start': 15027.469, 'duration': 1.921}, {'end': 15037.112, 'text': 'So of course, we see that count that post that three missed, count that followers missed, count that following missed.', 'start': 15030.31, 'duration': 6.802}], 'summary': 'Successfully caching post count, followers count, and following count for users.', 'duration': 28.97, 'max_score': 15008.142, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE15008142.jpg'}, {'end': 15170.656, 'src': 'embed', 'start': 15138.416, 'weight': 3, 'content': [{'end': 15141.62, 'text': 'And right here, we are hooking up into the created method.', 'start': 15138.416, 'duration': 3.204}, {'end': 15144.162, 'text': 'So right now we are generating a profile.', 'start': 15142.08, 'duration': 2.082}, {'end': 15148.627, 'text': 'And then right after that, we can actually send out our email.', 'start': 15144.643, 'duration': 3.984}, {'end': 15153.893, 'text': 'Okay, so a couple of setup things about sending emails in development.', 'start': 15149.088, 'duration': 4.805}, {'end': 15156.436, 'text': 'So there is a service called mail trap.', 'start': 15154.314, 'duration': 2.122}, {'end': 15158.298, 'text': "Let's head on over to mail trap right now.", 'start': 15156.716, 'duration': 1.582}, {'end': 15161.033, 'text': 'and that is mail trap.io.', 'start': 15159.212, 'duration': 1.821}, {'end': 15170.656, 'text': 'Now mail trap.io is basically a virtual inbox, it is free to sign up, you can simply just sign up either using a Google account or a GitHub account.', 'start': 15161.653, 'duration': 9.003}], 'summary': 'Developing a profile, setting up email using mailtrap.io', 'duration': 32.24, 'max_score': 15138.416, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE15138416.jpg'}], 'start': 13982.143, 'title': 'Laravel performance optimization', 'summary': 'Covers refactoring routes, fetching and displaying user posts, implementing pagination and caching, and setting up email sending in laravel. it discusses performance improvements, reducing database queries, and enhancing user experience.', 'chapters': [{'end': 14029.846, 'start': 13982.143, 'title': 'Refactoring route to reuse existing controller', 'summary': "Discusses refactoring a route to reuse the existing post controller's index method, which shows all resources, instead of creating a new controller, and ensuring the entire controller is under the middleware of 'auth'.", 'duration': 47.703, 'highlights': ["The chapter discusses reusing the existing post controller's index method to show all resources instead of creating a new controller.", "The chapter emphasizes ensuring the entire controller is under the middleware of 'auth' for security purposes."]}, {'end': 14450.49, 'start': 14030.246, 'title': 'Fetching and displaying user posts', 'summary': 'Discusses fetching all posts of the users being followed in reverse chronological order, using user ids and implementing the display layout.', 'duration': 420.244, 'highlights': ['Fetching posts of followed users', 'Using user IDs', 'Implementing display layout']}, {'end': 14838.45, 'start': 14451.011, 'title': 'Implementing pagination and caching in laravel', 'summary': 'Explains the implementation of pagination in laravel, showcasing how to limit the number of posts to 5 per page, and then discusses the optimization of database queries through caching in laravel, reducing the number of queries and enhancing performance.', 'duration': 387.439, 'highlights': ['Laravel makes pagination easy by using the paginate method in the post controller, limiting the display to 5 posts per page.', "Demonstrates the resolution of the 'n plus one' problem in Laravel by optimizing database queries to load relationships efficiently, resulting in a single query instead of multiple queries with a limit of one.", 'Introduction to implementing caching in Laravel to optimize performance by delivering cached versions of data within a specified time, reducing the need to recalculate data upon every request.']}, {'end': 15092.127, 'start': 14839.531, 'title': 'Implementing caching for performance', 'summary': 'Explains the implementation of caching using the illuminate support facades cache, demonstrating how to throttle calculations and enhance performance by caching post count, followers count, and following count for each user, resulting in significant performance improvements and reduced database hits.', 'duration': 252.596, 'highlights': ['The implementation of caching using illuminate support facades cache', 'Demonstration of caching post count, followers count, and following count for each user', 'Explanation of how caching throttles calculations and enhances performance']}, {'end': 15903.791, 'start': 15092.927, 'title': 'Setting up email sending in laravel', 'summary': 'Covers setting up email sending in laravel using mail trap for testing, creating a mailable for welcome email, and modifying routes and controllers for successful email sending and redirection.', 'duration': 810.864, 'highlights': ['Setting up email sending using mail trap for testing', 'Creating a mailable for welcome email', 'Modifying routes and controllers for successful email sending and redirection']}], 'duration': 1921.648, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ImtZ5yENzgE/pics/ImtZ5yENzgE13982143.jpg', 'highlights': ["Demonstrates the resolution of the 'n plus one' problem in Laravel by optimizing database queries to load relationships efficiently, resulting in a single query instead of multiple queries with a limit of one.", 'Introduction to implementing caching in Laravel to optimize performance by delivering cached versions of data within a specified time, reducing the need to recalculate data upon every request.', 'Demonstration of caching post count, followers count, and following count for each user', 'Setting up email sending using mail trap for testing', "The chapter discusses reusing the existing post controller's index method to show all resources instead of creating a new controller."]}], 'highlights': ['Laravel Telescope tracks various activities within the application, providing a comprehensive overview', 'Creating a follow button with Vue to enable server interaction without page refresh', 'Establishing user connections using Axios and setting up a controller', 'Implementing Laravel Telescope for activity tracking', "Demonstrates the resolution of the 'n plus one' problem in Laravel by optimizing database queries to load relationships efficiently, resulting in a single query instead of multiple queries with a limit of one", 'Introduction to implementing caching in Laravel to optimize performance by delivering cached versions of data within a specified time, reducing the need to recalculate data upon every request', 'Demonstration of caching post count, followers count, and following count for each user', 'Setting up email sending using mail trap for testing', 'Laravel is the fastest growing open-source PHP framework, number one framework in GitHub, and suitable for small to enterprise projects', 'Eloquent models enable database agnostic code, facilitating use of different databases']}