Laravel is a fascinating framework, huge and with a somewhat steep learning curve and with multiple options; this book is not for beginners and assumes that you already know how to program in Laravel.
Laravel Livewire takes Laravel development a step further; automating routine processes in very flexible schemes based on components, Livewire components that allow us to communicate client and server in a very simple, efficient and easy way.
Laravel Livewire is not a framework, it is just a layer or scaffolding that adds certain extra features to the framework that we can use to create great applications, with less effort and development time.
Foreword
Django is a framework with many options, it allows us to create applications with the language of the moment Python, a modular programming language, with an impeccable syntax that we can also use in a web environment.
It offers us a modular scheme between projects and applications, an important set of packages to extend the already complete framework and with this, the creation of scalable projects.
It is a framework that, by using Python, brings us its benefits of a clean, clear, precise syntax, a modular and scalable environment through packages.
In this book, we are going to learn how the framework is formed, the basic characteristics that Django allows us as the framework par excellence to create CRUDs processes, which range from the creation of views, templates, connection to models, routing, form validations, creating middleware among others.
In short, you will have an enormous material at your disposal, to make true web applications.
Who is this book for
This book is aimed at anyone who wants to start developing with Laravel Livewire in developing applications based on Laravel components with some additions that allow direct communication between server and client.
- This book is not recommended for those people who have not worked with Laravel, if this is your case, I advise you to first know and practice with Laravel before starting; on my website you will find courses, books, publications, videos and in general more information about Laravel.
- For people who want to improve a skill in web development, who want to grow as a developer.
- As long as you identify with at least one of the points mentioned above, this book is for you.
Topics of the book
This book has a total of 15 chapters, it is recommended that you read in the order in which they are arranged and as we explain the components of the framework, go directly to the practice, replicate, test and modify the codes that we show in this book.
- Chapter 1: In this chapter we are going to give a brief introduction about Laravel Livewire.
- Chapter 2: In this chapter we are going to create our project in Laravel Livewire.
- Chapter 3: In this chapter, we present the characteristics that a project created in Laravel Livewire has; team management, API Tokens, and authentication, are some of them.
- Chapter 4: In this chapter, we are going to create a simple CRUD type application and get to know all the elements of Livewire such as handling forms, views and directives through the Livewire components.
- Chapter 5: In this chapter, we are going to work on the style, improving the created application so that it looks like another Laravel Livewire module.
- Chapter 6: In this chapter, we are going to learn about the communication between Livewire components based on events; detect changes in properties of the component class from the view and know the Laravel Livewire JavaScript.
- Chapter 7: In this chapter, we are going to create the CRUD for the posts.
- Chapter 8: In this chapter, we are going to create filters and search fields for a listing taking advantage of the benefits of Livewire.
- Chapter 9: In this chapter, we are going to create sort fields for the column listing.
- Chapter 10: In this chapter, we will get to know everything that Livewire offers us in JavaScript and combine it with other plugins, we will know the hooks in JavaScript, consume properties, functions and use of events.
- Chapter 11: In this chapter, we are going to learn about some extra features of Laravel Livewire properties, such as customizing the update phase of wire:models, such as the use of computed properties.
- Chapter 12: In this chapter, we are going to create a simple blog application with a list with filters and search and detail fields.
- Chapter 13: In this chapter, we are going to create a shopping cart in the session and database, for which, we will see communication between components, sending events, toast type plugin to show messages confirming the operation carried out, with listeners of the events from JavaScript.
- Chapter 14: In this chapter, we are going to show the code of an application created with Alpine.js to create a to do list component.
- Chapter 15: In this chapter, we are going to adapt the Alpine.js application presented in the previous chapter, to work in conjunction with Livewire.
Livewire is a scaffolding for Laravel, which is nothing more than a skeleton or layer that adds certain extra features in Laravel through the use of Livewire components; the same basic Laravel components, but with very interesting additions that are what make up Livewire.
In addition to this, a project in Livewire already brings us Tailwind.css and Alpine.js configured.
In this book we will use the term “Basic Laravel” to mean the Laravel framework without any add-ons or scaffolding as is the case with Laravel Livewire.
What does Livewire offer us?
Laravel, being a more complete framework that you want to deal with, in practice, has many more components to work with, it is assumed that the reader has some basic knowledge about how the framework works, such as the use or theory of what migrations, MVC, routes, among others, work for; you don't need to know how to handle them, but you do need to understand the logic behind it all; if you don't have them, I recommend that you see my first web programming book in which we take the first steps with CodeIgniter, which is a great framework with many similarities with Laravel, and being a smaller framework and easier to handle is more easy to start your learning.
Finally; compared to other books, the approach will be a little more accelerated or general when it comes to the explanations of the elements that make up the framework; and this is so for two main aspects:
- I want to cover as many of the features of Laravel Livewire without making the book too long.
- This is not a recommended book if this is the first PHP framework of this type that you are facing, therefore, being so, you should already know these aspects of the structure of the framework.
Building modern web apps is hard, tools like Vue and React are extremely powerful, but the complexity they add to a full-stack developer's workflow is insane.
With the above in mind, Laravel Livewire is a complete framework for Laravel that makes it easy to create dynamic interfaces, without leaving the convenience of Laravel; in short, it allows us to use schemes similar to those of Vue and React directly in Laravel.
We can work with schemes similar to those of Laravel and Vue, but in a more direct and simple way; Laravel development is heavily tied to the use of components; the same Laravel components but with important additions from Laravel Livewire which allows you to greatly scale the use of components:
- Link using the routes file.
- Simple communication based on actions, events and functions between the client and the server.
- Add features such as pagination, file upload, query string among others.
In short, with Livewire, we can do the same thing that we do with Laravel and its controllers, but in a simpler way in which we can use the components and reuse pieces of code that Livewire offers us to make a very simple communication between the server with the client.
Apart from that, depending on how you decide to install Laravel Livewire, you can enable options that come for free like:
- Authentication system with registration, credential recovery.
- Profile view with user upload.
- Management of roles through teams.
- Handling the Tokens API using Laravel Breeze with a manageable interface.
In short, Livewire is not a framework, you can see it as another package that adds extra features to some Laravel elements that ultimately make it a scaffolding or skeleton for our applications.
The book is currently in development…
Desarrollo con Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter