Laravel 5.x Cookbook (Packt 2016)

时间:2020-10-01 15:48:17
【文件属性】:

文件名称:Laravel 5.x Cookbook (Packt 2016)

文件大小:26.58MB

文件格式:PDF

更新时间:2020-10-01 15:48:17

PHP laravel 框架 framework

Table of Contents Preface v Chapter 1: Setting Up and Installing Laravel 1 Introduction 1 Setting up Homestead 1 Setting composer and PHP on your local machine for faster Workflows 4 Setting up your first application in Homestead 6 Using .env for your local build 9 Using sequel pro and connecting to local and remote databases 12 Setting up Gulp and Elixir 14 Chapter 2: Using Composer Packages 17 Introduction 17 Working with Composer install command and avoiding Composer update 17 Making a provider 21 Using the Facade pattern 27 Using private packages 29 Chapter 3: Routing 33 Introduction 33 Building an API / JSON based route for searching 33 Testing your route in PHPUnit 37 Building a view based route 40 Testing your view based route in PHPUnit 42 Creating named routes 45 Chapter 4: Building Views and Adding Style 49 Introduction 49 Organizing your Blade files 49 Installing a WrapBootStrap theme 55 Making your authentication pages 61 ii Table of Contents Implementing an error message template 65 Building your main search page 70 Adding a static page 76 Chapter 5: Working with Data 79 Introduction 79 Setting up users and running migrations 79 Altering a migration 81 Using factories for migrations and tests 84 Using a generator to scaffold your user wishlist area 90 Seeding so you can see how your app looks 95 Adding a file upload to user profile 99 Validating the file upload 108 Saving files to S3 112 Chapter 6: Adding Angular to Your App 123 Introduction 123 Adding Angular search to our search page 130 Handling Angular and Ajax requests 138 Paginating our Angular results 149 Testing an angular page with Behat 157 Creating a relationship with favorites 161 Building a favorites Ajax widget in Angular 164 Validating incoming input 173 Using the CORS protection 176 Using Elixir and Gulp to set up Angular 183 Chapter 7: Authentication, Security, and Subscriptions 191 Introduction 191 Using policies and guard to protect user pages 192 Adding feature flags to hide features from users 196 Implementing Socialite to allow users to login with Facebook 201 Adding custom middleware to protect user admin area 206 Using Laravel to set up a subscription site 211 Creating an interface for the user to manage subscriptions 222 Creating an admin interface for subscriptions 225 iii Table of Contents Chapter 8: Testing and Debugging Your Application 233 Introduction 233 Generating tests 234 Using tests to think through your code TDT (Test Driven Thinking) 236 Getting your code onto GitHub 244 Using VCR for API testing 247 Using Travis to run tests with every push 252 Launching Gulp watch into your workflow 259 Using mockery to test your controllers 261 Troubleshooting your application 268 Chapter 9: Adding Advanced Features to Your App 271 Introduction 271 Building an Artisan command 272 Creating scheduler to notify users of new comics 277 Setting up e-mail notices 280 Adding clean URLS for the users profile page 287 Using pusher for live notifications 293 Adding a blog area to update users on new features 303 Chapter 10: Deploying Your App 323 Introduction 323 Setting up Forge, AWS, and CodeDeploy 324 Setting up Travis to auto deploy when all is passing 353 Working with your .env file 355 Testing your app on Production with Behat 359 Making a composer package out of our client 366 Index 381


网友评论

  • 其实还没有看 不过应该还可以吧