Yii 2 Para Principiantes
Yii 2 Para Principiantes
Sobre este libro
Yii 2 para principiantes lo llevará paso a paso a través de la configuración e instalación, y luego a la codificación en el framework PHP más excitante disponible hoy. El libro se centra en la creación de una plantilla reutilizable que pueda servir como base para sus proyectos, incluyendo las siguientes características:
- Configuración e instalación
- Un modelo de usuario funcional
- Registro y logueo de Usuario
- Perfil de Usuario
- Recuperación de contraseña olvidada
- Separación del frontend y backend
- Clases auxiliares
- Control de acceso
- Control de contenido Gratuito/Pago
- RBAC con interface de usuario en el backend
- Selector de fechas (DatePicker) JUI
- Widgets Sociales de Facebook
- Implementación de Font-Awesome
- Inicio de sesión y Registro a través de Facebook con un solo click
Este libro es perfecto para programadores PHP principiantes que están listos para moverse hacia el desarrollo usando frameworks. El framework PHP Yii 2 es altamente escalable y extensible, y cargado con características. Lo introducimos a este framework maravilloso y explicamos en detalle todo lo que necesita saber para ponerse en marcha. ¡Le encantará Yii 2!
Table of Contents
-
Capítulo Uno: Introducción
- Introducción
- Características
- ¿Qué hace tan especial al framework Yii 2?
- Ventajas
- Desventajas
- Por qué elegí Yii 2
- Otras opciones
- Yii 2 llega
- Gii
- Enfoque base de datos primero
- MySql
- Flujo de trabajo mejorado
- Habilidades mínimas en PHP
- Herramientas que necesitará
- Errata
- Información de Contacto
- Resumen
-
Capítulo Dos: Instalación de la Plantilla Avanzada
- Configuración rápida de la de la Plantilla Avanzada de Yii 2
- Paso 1 - Crear el Directorio
- Paso 2 - Configuración de Apache
- Paso 3 - Host Local
- Paso 4 - Reiniciar Apache
- Paso 5 - Crear el Proyecto en el IDE
- Paso 6 - Encontrar la Ruta de la Línea de Comandos
- Paso 7 - Composer Self-Update
- Paso 8 - Instalar Yii 2
- Paso 9 - Revisar su directorio Yii 2
- Paso 10 - Ejecutar Php Init
- Paso 11 - Crear la Base de Datos
- Paso 12 - Establecer la conexión a la BD
- Paso 13 - Ejecutar la Migración
- Paso 14 - Crear el Repositorio en Git
- Paso 15 - Confirmar que la Aplicación está funcionando
- Solución de problemas
- Resumen
-
Capítulo Tres: Bienvenido al MVC
- Patrón MVC
- Index.php
- La Instancia de la Aplicación
- Ruteo
- Usando Gii
- Bootstrap
- Depurador
- Resumen
-
Capítulo Cuatro: Modificando el Modelo de Usuario
- Rol y Estado
- El modelo User
- Propiedades del Modelo
- Constantes
- Interfaz Identidad (Identity Interface)
- Comportamientos (Behaviors)
- Rules
- Métodos de Identidad (Identity Methods)
- Métodos Predefinidos
- Otros modelos que acceden a User
- Modelo SignupForm
- Resumen
-
Capítulo Cinco: Creando Nuevos Modelos con Gii
- Creando Tablas
- Tabla Rol
- Tabla Estado
- Tabla Tipo Usuario
- Tabla Genero
- Tabla Perfil
- Sincronice
- Configurando Gii
- Construyendo Modelos con Gii
- Crear el Modelo Rol
- Agregar Registros a la Tabla Rol
- Agregar la Relación a Rol
- Actualizar el Modelo User con Rol
- Crear el Modelo Estado
- Actualizar el Modelo User con getEstado
- Agregar registros a la Tabla Estado
- Crear Modelo Tipo Usuario
- Actualizar el Modelo User con TipoUsuario
- Agregar Registros a la Tabla tipo_usuario
- Crear el Modelo Genero
- Agregar Registros a la Tabla genero
- Crear Modelo Perfil
- El Modelo Perfil Completo
- Actualizar el Modelo User con Perfil
- Finalizar el Modelo User
- El Modelo User Completo
- Resumen
-
Capítulo Seis: Helpers (Auxiliares)
- Helpers de Valor
- Permisos Helpers
- Registros Helpers
- Resumen
-
Capítulo Siete: Controlador del Sitio
- Behaviors
- Acciones
- Acción Index
- Acción Login
- Modelo Login Form
- Acción Logout
- Acción Contacto
- Modelo Contact Form
- Captcha
- La Vista del Formulario de Contacto
- Acción About
- Acción Signup
- Modelo Signup Form
- ResetPasswordForm Model
- Controlador de Sitio del Backend
- Comenzando el Control de Acceso
- Método loginAdmin
- Resumen
-
Capítulo Ocho: Crud de Perfil
- CRUD
- Controlador de Perfil
- Búsqueda de Perfil
- _search
- _form
- Index
- View
- Create
- Update
- Modificando el Controlador y las Vistas de Perfil
- Modificando el Controlador de Perfil
- Acción Index
- Acción View
- Acción Create
- Acción Update
- Acción Delete
- Acción FindModel
- Modificando la Vistas de Perfil
- View.php
- Genero
- Parcial Formulario
- Create
- Update
- Layout del Sitio
- Link a Perfil
- DatePicker
- Resumen
-
Capítulo Nueve: Upgrade y Control de Acceso
- Controlador Upgrade
- Vista Index de Upgrade
- Requerir Upgrade A
- Control de Acceso
- Pasando una Variable desde el Controlador
- Resumen
-
Capítulo Diez: Widgets Sociales de la Homepage
- Implementando Widgets Sociales en la Homepage
- Index
- Widget de Facebook
- Configuración de la App de Facebook
- Configuración de Facebook
- Extensiones
- Helper HTML
- Widget Collapse
- Widget Modal
- Widget Alert
- Font-Awesome
- Asset Bundle
- Agregar Font-Awesome al Layout
- Resumen
-
Capítulo Once: Creación del Backend
- Main.php
- Modificando las Vistas del Backend
- backend/views/perfil/_form.php
- backend/views/perfil/view.php
- backend/views/user/view.php
- backend/views/user/_form
- Cambios más profundos al Backend
- backend/views/user/index.php
- backend/views/perfil/index.php
- backend/views/perfil/_search.php
- backend/views/user/_search.php
- User Search
- IU de Admin
- Behaviors del Controlador
- Match Callback
- Resumen
- Sobre el Autor
-
Capítulo Doce: Material Extra
- AutoResponder
- Navegación mediante Dropdown
- FAQ
- Test Controller
- Componentes
- Creando un Widget personalizado
- CDN
- Resumen
-
Capítulo Trece: Material Extra Urls Amigables y Slugs
- URLs Amigables
- Vhost de Apache
- Reinicie Apache
- Slugs
- Sluggable Behavior
- Columna Slug
- Elimine las Faqs viejas y cree nuevas
- Añadir Reglas al Url Manager
- Modificar la Acción View en FaqController
- Modificar las acciones Create y Update en el controlador del backend
- Cambiar la URL de la columna acción de la Gridview
- Resumen
-
Capítulo 14: Material Extra Login y Registro con Redes Sociales
- Yii2 - AuthClient
- Instalar yii2authclient via Composer
- Configuración
- Problema con Twitter
- Aplicaciones de Proveedores
- App de Google
- App de LinkedIn
- Faq Controller
- Frontend Faq view.php
- _rating-form.php
- FaqRatings Controller
- Faq Model
- Faq Index View
- Faq View
- Signup Form Model
- signup.php
- terms.php
- termsoverflow.css
- Frontend AppAsset.php
- Improving The Carousel
- Modify marketing_imageTable
- Modify MarketingImage Model
- MarketingImage Views
- Marketing Image view.php
- Update View
- MarketingImage Controller
- Create Action
- Update Action
- Delete Action
- Entire File
- CarouselSettings Model Rules
- CarouselWidget
- validateSize Method
- Entire CarouselWidget File
- carousel.php
- Summary
-
Chapter 17: Bonus Material Returning Calculated Values in Gridview
- Sorting A Calculated Value In Gridview
- Donate To Kartik
- Average Rating For Gridview
- Times Rated
- Summary
Authors have earned$9,883,643writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Más información sobre cómo escribir en Leanpub
Leanpub incondicional, sin riesgo, 100% de felicidad garantizada
Durante los primeros 45 días de compra, puedes obtener un reembolso del 100% de cualquier compra Leanpub, en dos clics. Procesamos las restituciones manualmente, así que puede tomarse unos días en aparecer. Véase términos completos.
Actualizaciones gratis. Libre de DRM.
¡Si compras un libro Leanpub obtienes actualizaciones gratis siempre y cuando el autor actualice el libro! Varios autores usan Leanpub para publicar sus libros en progreso mientras los escriben. Todos los lectores obtienen actualizaciones gratis, independientemente de cuándo compraron el libro o cuánto pagaron (incluyendo si fue gratis).
La mayoría de los libros Leanpub se encuentran disponibles en PDF (para computadores), EPUB (para teléfonos y tabletas) y MOBI (para Kindle). Los formatos que un libro incluye se muestran en la esquina superior derecha de esta página.
Finalmente, los libros Leanpub no tienen ninguna de las cosas sin sentido sobre protección de copia DRM, así que puedes leerlos fácilmente en cualquier dispositivo que se soporta.
Aprende más sobre los formatos de Leanpub y dónde puedes leerlos
Top Books
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Functional Design and Architecture
Alexander GraninSoftware Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
C++20
Rainer GrimmC++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
I am a Software Engineer and I am in Charge
Alexis Monville and Michael DoyleI am a Software Engineer and I am in Charge is a real-world, practical book that helps you increase your impact and satisfaction at work no matter who you work with.
In the book, we will follow Sandrine, a fictional character who learns to think in a new way enabling her to take a different course of action.
Atomic Kotlin
Bruce Eckel and Svetlana IsakovaFor both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
Invest In Digital Health - The Medical Futurist's Guide
Dr. Bertalan MeskoArtificial Intelligence and Digital Health are booming. In this book, we explain why now it's a good time to invest in Digital Health and give recommendations on where to invest by looking at the top 24 technological trends we find the most promising.
The Hundred-Page Machine Learning Book
Andriy BurkovEverything you really need to know in Machine Learning in a hundred pages.
Mastering STM32
Carmine NovielloWith more than 600 microcontrollers, STM32 is probably the most complete ARM Cortex-M platform on the market. This book aims to be the first guide around that introduces the reader to this exciting MCU portfolio from ST Microelectronics and its official CubeHAL.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #3
The Future of Digital Health
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy and how technology giants such as Amazon or Google want to conquer... - #4
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #5
CCDE Practical Studies (All labs)
3 Books
CCDE lab - #6
"The C++ Standard Library" and "Concurrency with Modern C++"
2 Books
Get my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle. The first book gives you the details you should know about the C++ standard library; the second one dives deeper into concurrency with modern C++. In sum, you get more than 600 pages full of modern C++ and about 250 source files presenting the standard library... - #7
Modern Management Made Easy
3 Books
Read all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization. - #8
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité... - #9
Programming with Ease
3 Books
Alle drei Bände der Serie Programming with Ease in einem Paket. Darin findest du alles, was ich dir zu den wichtigsten Phasen der Softwareentwicklung im Hinblick auf Clean Code Development für langfristig hohe Produktivität sagen kann.Im Band Slicing findest du die Anforderungsanalyse im Rahmen eines iterativ-inkrementellen Vorgehensmodells aus... - #10
Vagrant Ansible
2 Books
Unveil the power of Ansible and Vagrant with this bundle at a special price. You'll have everything you need to get started with Vagrant - learn the basics and how to create your virtual development environments, using Ansible as provisioner! About Vagrant Cookbook Vagrant Cookbook is a complete guide to get started with Vagrant and create your...