Ultimate Laravel for Modern Web Development / Laravel для современной веб-разработки Год издания: 2024 Автор: Jain Drishti / Джайн Дришти Издательство: Orange Education Pvt Ltd, AVA ISBN: 978-81-96782-65-8 Язык: Английский Формат: PDF/EPUB Качество: Издательский макет или текст (eBook) Количество страниц: 284 Описание: Unlock the Power of Laravel: Elevate Your Web Development Game! The “Ultimate Laravel for Modern Web Development” is a comprehensive journey through Laravel, the PHP framework revolutionizing web development. This practical guide ensures a fluid progression from fundamentals to advanced techniques, making you a seasoned Laravel expert. The book begins with the fundamentals, seamlessly transitioning into the core of Laravel’s MVC architecture. It then navigates through routers, views, controllers, and Blade templates, building a strong foundation for your projects. As you progress, the book will uncover the power of Eloquent ORM and Query Builder, mastering efficient data handling. You will implement seamless authentication and authorization processes to ensure the security of your applications and develop robust APIs to enhance your application’s functionality and connectivity. The book will dive into the art of testing and debugging, refining your Laravel projects for optimal performance. It will delve into email and notifications, adding dynamic communication to your applications. Finally, you will learn the ins and outs of deploying your Laravel app to the cloud, bringing your creations to a global audience. Раскройте возможности Laravel: улучшите свою игру в веб-разработке! “Laravel для современной веб-разработки” - это всестороннее знакомство с Laravel, PHP-фреймворком, революционизирующим веб-разработку. Это практическое руководство обеспечивает плавный переход от основ к продвинутым методам, что делает вас опытным экспертом по Laravel. Книга начинается с основ, плавно переходящих к ядру архитектуры MVC Laravel. Затем он перемещается по маршрутизаторам, представлениям, контроллерам и блейд-шаблонам, создавая прочную основу для ваших проектов. По мере того, как вы будете продвигаться вперед, книга раскроет возможности Eloquent ORM и конструктора запросов, поможет освоить эффективную обработку данных. Вы научитесь внедрять бесперебойные процессы аутентификации и авторизации для обеспечения безопасности ваших приложений и разрабатывать надежные API-интерфейсы для улучшения функциональности и подключения вашего приложения. Книга познакомит вас с искусством тестирования и отладки, улучшая ваши проекты на Laravel для достижения оптимальной производительности. В ней подробно рассматриваются электронная почта и уведомления, добавляющие динамичности вашим приложениям. Наконец, вы узнаете все тонкости развертывания вашего приложения Laravel в облаке, что позволит донести ваши творения до глобальной аудитории.
Примеры страниц (скриншоты)
Оглавление
1. Getting Started with Laravel......................................................................................... 1 Introduction.............................................................................................................. 1 Structure.................................................................................................................... 1 Introduction to Laravel......................................................................................... 2 Preference for Laravel...........................................................................................2 Scalable......................................................................................................................2 MVC Architecture...................................................................................................2 Community.............................................................................................................. 3 Class Dependency Management....................................................................... 3 Eloquent ORM......................................................................................................... 3 Unique Features of Laravel..................................................................................5 Database Seeding....................................................................................................5 Localization............................................................................................................. 6 Latest Version Release Changes......................................................................... 8 How to Upgrade..................................................................................................... 8 Dependencies ......................................................................................................... 8 Minimum Stability.......................................................................................................9 Public Path Binding.....................................................................................................9 Redis Cache Tags........................................................................................................ 10 Database Expressions...............................................................................................10 Eloquent......................................................................................................................... 10 Testing............................................................................................................................ 11 Installation and Setup of Laravel Development Environment....................11 Installing PHP.........................................................................................................11 Mac............................................................................................................................. 11 Windows.................................................................................................................. 12 Installing Composer............................................................................................. 14 Mac............................................................................................................................ 14 Windows.................................................................................................................. 16 Installing Laravel.................................................................................................. 17 Laravel Artisan........................................................................................................18 Core Concept......................................................................................................... 24 Conclusion.............................................................................................................. 25 2. MVC Architecture in Laravel...................................................................................... 26 Introduction...........................................................................................................26 Structure.................................................................................................................26 Overview of MVC Architecture.........................................................................26 History.....................................................................................................................27 Separation of Components................................................................................27 MVC Architecture Pattern in the Context of Laravel..................................28 Design Principles................................................................................................. 29 Reusability............................................................................................................. 29 Flexibility................................................................................................................ 29 Cohesion................................................................................................................. 29 Coupling.................................................................................................................30 Design Independence in Components...........................................................30 MVC in Laravel......................................................................................................30 Key Features........................................................................................................... 31 SEO Friendly.......................................................................................................... 31 Importance of SEO..................................................................................................... 31 Principles...................................................................................................................... 31 Test Driven Development.................................................................................. 32 Simultaneous Development.............................................................................. 32 Maintainability and Extensibility.................................................................. 32 Models in Laravel................................................................................................ 33 Views in Laravel.................................................................................................. 33 Controllers in Laravel........................................................................................ 34 Conclusion..............................................................................................................34 3. Routers and Views in Laravel..................................................................................... 36 Introduction ..........................................................................................................36 Structure.................................................................................................................36 Routers in Laravel ................................................................................................ 37 Introduction to Routers......................................................................................37 Routes Directory.................................................................................................. 38 Router Methods.................................................................................................... 39 Types of Routers................................................................................................... 39 Redirect Routes..................................................................................................... 40 View Routes........................................................................................................... 40 The Route List....................................................................................................... 40 Fallback Routes...................................................................................................... 41 Route Parameters................................................................................................. 41 Optional Parameters.......................................................................................... 42 Regular Expressions Constraints................................................................... 43 Regular Expressions........................................................................................... 43 Regular Expressions Constraints......................................................................... 45 Route Groups........................................................................................................ 46 Middleware.............................................................................................................47 Controllers............................................................................................................. 48 Subdomain Routing............................................................................................ 49 Route Prefixes....................................................................................................... 49 Cross-origin Resource Sharing (CORS)........................................................50 Caching.................................................................................................................... 51 Views in Laravel ....................................................................................................51 Creating Views..................................................................................................... 52 Views and View Extensions.............................................................................. 53 Nested Views Directories.................................................................................. 53 First Available View............................................................................................ 53 Data and Views.................................................................................................... 54 Sharing Data......................................................................................................... 55 View Composers and Creators........................................................................ 56 View Composers................................................................................................... 56 Multiple Views with Composer............................................................................. 59 View Creators............................................................................................................. 60 View Optimization..............................................................................................60 Conclusion...............................................................................................................61 Points to Remember............................................................................................62 4. Building Controllers and Blade Templates........................................................... 63 Introduction...........................................................................................................63 Structure.................................................................................................................63 Controllers with Views in Laravel ...................................................................64 Controllers............................................................................................................. 64 Resource Controllers........................................................................................... 65 Constructor Injection..........................................................................................67 Method Injection.................................................................................................. 68 Redirects in Laravel .............................................................................................69 Redirect Helper..................................................................................................... 69 Redirecting to Named Routes........................................................................... 69 Redirecting to Controller Actions................................................................... 70 Redirecting - Flashed Session Data............................................................... 70 Directives in Laravel ............................................................................................ 71 Conditional Directives........................................................................................72 Custom if Statements..........................................................................................73 Switch Directive....................................................................................................73 Auth Directive........................................................................................................74 Loops.........................................................................................................................76 Once Directive...................................................................................................... 78 Blade as Template Engines in Laravel............................................................. 79 Data in Blade.........................................................................................................79 HTML Entity Encoding......................................................................................80 Components........................................................................................................... 81 Rendering Components..................................................................................... 82 Passing Data.......................................................................................................... 83 Layouts.................................................................................................................... 84 Template Inheritance......................................................................................... 85 Rendering Blade Templates.............................................................................. 86 Rendering Blade Fragments............................................................................. 87 Conclusion .............................................................................................................88 Points to Remember............................................................................................88 5. Working with Eloquent ORM and Query Builder...............................................90 Introduction ..........................................................................................................90 Structure.................................................................................................................90 Eloquent in Laravel................................................................................................91 Database Migrations.......................................................................................... 92 Primary Key................................................................................................................ 93 Timestamps........................................................................................................... 94 Eloquent Events....................................................................................................95 Query Builder in Laravel..................................................................................... 97 Selects.......................................................................................................................97 Joins......................................................................................................................... 99 Left Join.................................................................................................................. 99 Advanced Joins................................................................................................... 100 Advanced Where................................................................................................ 100 Aggregates............................................................................................................. 101 Raw Expressions................................................................................................. 101 Pessimistic Locking........................................................................................... 102 Caching Queries................................................................................................ 102 Eloquent Operations.......................................................................................... 102 Model Classes...................................................................................................... 103 Model Conventions........................................................................................... 104 Table Name.......................................................................................................... 105 Primary Key........................................................................................................ 105 UUID and ULID Keys........................................................................................ 108 Database Connections....................................................................................... 110 Retrieving Models............................................................................................... 110 Collections............................................................................................................. 111 Chunking Results.................................................................................................112 Chunk Using Lazy Collections........................................................................ 113 Cursors....................................................................................................................114 Advanced Subqueries..........................................................................................115 CRUD Operations on Models.......................................................................... 116 Events..................................................................................................................... 118 Conclusion............................................................................................................ 120 Points to Remember........................................................................................... 121 6. Implementing Authentication and Authorization in Laravel.......................122 Introduction .........................................................................................................122 Structure................................................................................................................122 Laravel’s built-in Authentication System......................................................123 Laravel API Authentication Services............................................................124 Passport.................................................................................................................124 Sanctum.................................................................................................................125 Customizing Authentication and Registration logic...................................125 HTTP Authentication........................................................................................125 Stateless HTTP Authentication......................................................................126 Custom User Providers..................................................................................... 127 User Provider Contract.....................................................................................129 Authenticatable Contract................................................................................. 131 Implementing Authorization Policies and Gates.........................................132 Invalidating User Sessions...............................................................................133 Password Management.....................................................................................134 Configuration......................................................................................................134 Routing...................................................................................................................134 Authentication Custom Guards.....................................................................136 Closure Request Guards.................................................................................... 137 Invalidate Sessions across Multiple Devices..............................................139 User Session Knowledge.................................................................................. 140 Additional Authentication Methods............................................................. 140 Authenticate a User Instance...........................................................................141 Authenticate a User By ID................................................................................142 Authenticate a User Once................................................................................142 Securing Routes and Actions with Middleware...........................................142 Middleware...........................................................................................................143 Assigning Middleware To Routes...................................................................146 Middleware Groups...........................................................................................148 Sorting Middleware.................................................................................................150 Middleware Parameters..........................................................................................151 Terminable Middleware......................................................................................... 152 Conclusion.............................................................................................................154 Points to Remember...........................................................................................155 7. Developing APIs with Laravel...................................................................................156 Introduction ........................................................................................................ 156 Structure............................................................................................................... 156 Understanding APIs, REST................................................................................157 REST....................................................................................................................... 157 SOAP....................................................................................................................... 157 Resources, Collections and Nesting Relationships.....................................157 Writing Resource................................................................................................ 161 Relationships........................................................................................................162 Data Wrapping....................................................................................................163 Understanding Data Wrapping.....................................................................165 Conditional Relationships................................................................................ 167 Resource Response..............................................................................................169 Laravel Passport...................................................................................................170 Installing and Setup............................................................................................ 171 Configuration...................................................................................................... 172 Token Lifetimes......................................................................................................... 172 Overriding Default Models.................................................................................... 173 Overriding Routes.................................................................................................... 174 Access Tokens.......................................................................................................175 Client...................................................................................................................... 175 JSON API............................................................................................................... 176 GET............................................................................................................................... 176 POST............................................................................................................................. 177 PUT............................................................................................................................... 177 DELETE....................................................................................................................... 178 Protecting Routes................................................................................................ 178 Middleware........................................................................................................... 179 Access Token........................................................................................................ 180 Token Scopes....................................................................................................... 180 Defining a scope................................................................................................. 180 Default Scope....................................................................................................... 181 Check Scope................................................................................................................182 Conclusion............................................................................................................ 183 Points to Remember...........................................................................................184 8. Testing and Debugging your Laravel Application.............................................185 Introduction......................................................................................................... 185 Structure............................................................................................................... 185 Introduction to Testing in Laravel................................................................. 186 Setting up Environment for Testing.............................................................186 Testing Lifecycle.................................................................................................. 187 Creating Tests............................................................................................................ 187 Running Tests............................................................................................................189 Parallel Execution of Tests.....................................................................................189 Reporting.....................................................................................................................192 HTTP Tests........................................................................................................... 193 Make a Request....................................................................................................193 Customizing Request Headers........................................................................194 Cookies.........................................................................................................................195 Authentication...........................................................................................................196 Debugging Responses..............................................................................................198 Exception Handling................................................................................................200 File Upload Testing............................................................................................ 200 Debugging in Laravel.........................................................................................202 Conclusion........................................................................................................... 203 Points to Remember..........................................................................................204 9. E-mail and Notifications in Laravel.......................................................................205 Introduction ........................................................................................................205 Structure...............................................................................................................205 Generating Notifications................................................................................. 206 Sending Notifications....................................................................................... 206 Delivery Channels............................................................................................. 207 Queuing Notifications......................................................................................208 Delaying Notifications.....................................................................................209 Custom Notification Queue............................................................................ 210 Custom Notification Channel Queue............................................................211 On-Demand Notifications...............................................................................213 Mail Notifications................................................................................................214 Customizing Email Components...................................................................215 Custom templates............................................................................................... 217 Handling Raw Data.................................................................................................219 Tags and Metadata............................................................................................220 Custom Symfony Message................................................................................221 Broadcast Notifications......................................................................................221 Notification Events........................................................................................... 224 Conclusion............................................................................................................226 Points to Remember.......................................................................................... 227 10. Deploying your Laravel App to Cloud................................................................... 229 Introduction.........................................................................................................229 Structure...............................................................................................................229 Cloud Deployment Fundamentals..................................................................230 Cloud Providers Overview.................................................................................231 Amazon Web Services........................................................................................231 Heroku................................................................................................................... 232 Google Cloud....................................................................................................... 232 Laravel Application Deployment with Vapor...............................................233 Installation..........................................................................................................233 Installing the Vapor Core................................................................................234 Installing the Vapor Dashboard.......................................................................... 234 Dashboard Authorization...................................................................................... 235 Environment............................................................................................................. 235 Deployment............................................................................................................... 239 Hooks........................................................................................................................... 239 Development.............................................................................................................. 241 Configure OpenSSL................................................................................................. 241 Domains..................................................................................................................... 244 DNS Records.............................................................................................................. 245 Custom Records........................................................................................................ 245 SSL Certificates........................................................................................................ 246 Add Domain to Environment............................................................................... 246 Troubleshooting..................................................................................................249 Conclusion............................................................................................................250 Points to Remember...........................................................................................251 Index.................................................................................................................... 252
Jain Drishti / Джайн Дришти - Ultimate Laravel for Modern Web Development / Laravel для современной веб-разработки [2024, PDF/EPUB, ENG] download torrent for free and without registration
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum