Академический Документы
Профессиональный Документы
Культура Документы
Sivaraj Selvaraj
Building Real-Time Marvels with Laravel: Create Dynamic and Interactive Web
Applications
Sivaraj Selvaraj
Ulundurpettai, Tamil Nadu, India
Introduction��������������������������������������������������������������������������������������������������������xxxiii
v
Table of Contents
vi
Table of Contents
vii
Table of Contents
viii
Table of Contents
ix
Table of Contents
x
Table of Contents
xii
Table of Contents
xiii
Table of Contents
xiv
Table of Contents
xv
Table of Contents
xvi
Table of Contents
xvii
Table of Contents
xviii
Table of Contents
Chapter 19: Building Progressive Web Applications (PWAs) with Laravel����������� 477
Understanding Progressive Web Applications and Service Workers����������������������������������������� 478
Key Characteristics of Progressive Web Applications���������������������������������������������������������� 479
Service Workers������������������������������������������������������������������������������������������������������������������ 479
Converting Laravel Applications into PWAs������������������������������������������������������������������������������� 480
Set Up a Manifest File��������������������������������������������������������������������������������������������������������� 480
Offline Support and Caching Strategies for PWAs�������������������������������������������������������������������� 484
Offline Support�������������������������������������������������������������������������������������������������������������������� 485
Caching Strategies�������������������������������������������������������������������������������������������������������������� 486
Push Notifications and Background Sync in PWAs������������������������������������������������������������������� 488
Push Notifications��������������������������������������������������������������������������������������������������������������� 488
Background Sync���������������������������������������������������������������������������������������������������������������� 489
Optimizing PWAs for Performance and User Experience���������������������������������������������������������� 491
Performance Auditing���������������������������������������������������������������������������������������������������������� 491
Code Splitting���������������������������������������������������������������������������������������������������������������������� 491
Lazy Loading������������������������������������������������������������������������������������������������������������������������ 492
xix
Table of Contents
xx
Table of Contents
Enhancing User Experience with CSS Animation and Transition Effects���������������������������������� 506
CSS Animations������������������������������������������������������������������������������������������������������������������� 506
CSS Transitions�������������������������������������������������������������������������������������������������������������������� 507
Keyframe Animations���������������������������������������������������������������������������������������������������������� 507
Delicate Hover Effects��������������������������������������������������������������������������������������������������������� 508
CSS Transitions for Smooth State Changes������������������������������������������������������������������������� 508
Animation Timing Functions������������������������������������������������������������������������������������������������ 509
Use Animations Sparingly���������������������������������������������������������������������������������������������������� 509
Designing Accessible Applications with Laravel����������������������������������������������������������������������� 509
Semantic HTML������������������������������������������������������������������������������������������������������������������� 510
ARIA Roles and Attributes���������������������������������������������������������������������������������������������������� 510
Focus Management������������������������������������������������������������������������������������������������������������� 511
Alternative Text for Images�������������������������������������������������������������������������������������������������� 511
Form Accessibility��������������������������������������������������������������������������������������������������������������� 511
Color Contrast���������������������������������������������������������������������������������������������������������������������� 511
Test with Assistive Technologies����������������������������������������������������������������������������������������� 512
Accessibility Auditing Tools������������������������������������������������������������������������������������������������� 512
Provide Transcripts and Captions���������������������������������������������������������������������������������������� 512
Implementing User Feedback and Usability Testing in Laravel Applications���������������������������� 512
Feedback Collection Mechanisms��������������������������������������������������������������������������������������� 512
Error Reporting�������������������������������������������������������������������������������������������������������������������� 513
Analyze User Behavior��������������������������������������������������������������������������������������������������������� 513
Usability Testing������������������������������������������������������������������������������������������������������������������ 514
User Surveys����������������������������������������������������������������������������������������������������������������������� 514
Feedback Analysis and Action Plan������������������������������������������������������������������������������������� 515
Iterative Improvement��������������������������������������������������������������������������������������������������������� 515
Accessibility Testing������������������������������������������������������������������������������������������������������������ 515
Performance Testing������������������������������������������������������������������������������������������������������������ 515
User Support and Communication��������������������������������������������������������������������������������������� 515
Bug Tracking and Issue Management��������������������������������������������������������������������������������� 515
Summary���������������������������������������������������������������������������������������������������������������������������������� 516
xxi
Table of Contents
xxiii
Table of Contents
xxiv
Table of Contents
Enhanced SQL Server Query Performance with FETCH and OFFSET for Queries Without
orderBy������������������������������������������������������������������������������������������������������������������������������������� 620
Laravel Pennant������������������������������������������������������������������������������������������������������������������������ 621
Laravel Process Interaction������������������������������������������������������������������������������������������������������� 622
Pest Scaffolding������������������������������������������������������������������������������������������������������������������������ 624
Summary���������������������������������������������������������������������������������������������������������������������������������� 624
Index��������������������������������������������������������������������������������������������������������������������� 625
xxv
About the Author
Sivaraj Selvaraj’s work is focused on modern technologies
and industry best practices. His experience includes
frontend development approaches such as HTML5, CSS3,
and JavaScript frameworks, as well as creating responsive
web design to optimize user experience across devices. He
specializes in developing dynamic web applications with
server-side languages such as PHP, WordPress, and Laravel,
as well as managing and integrating databases with SQL and
MySQL. Sivaraj is enthusiastic about sharing his significant
expertise and experience, empowering readers to solve tough challenges and create
highly functional, visually appealing websites.
xxvii
About the Technical Reviewer
Yogesh Kamal Sharma is an application developer
enthusiast, consultant, and avid paperback reader. He is
presently associated with NICE Actimize to modernize
AML programs by bringing together machine learning and
domain expertise to combat money laundering and terrorist
financing. He graduated from VSIT Mumbai, is a father of
one, and enjoys his free time golfing.
xxix
Acknowledgments
I am indebted to my mentors and fellow developers in the Laravel community. Your
guidance, insights, and shared knowledge have been pivotal in my growth as a Laravel
developer. The open collaboration and spirit of learning in the community have inspired
me to strive for continuous improvement.
I extend my gratitude to the reviewers and editors who diligently reviewed and
refined the content, ensuring its accuracy and clarity.
To my friend Divya Modi, thank you for your unwavering camaraderie and
encouragement throughout this journey. Your insights and discussions have enriched
my understanding of book development as a whole.
To all the readers and supporters of this book, thank you for your interest in learning
and mastering Laravel. Your passion for growth and dedication to honing your skills
motivate me to share my knowledge and experiences.
This book would not have been possible without the contributions of each individual
mentioned here. Your belief in this project and your unwavering support have been
integral to its success.
With sincere appreciation
xxxi
Introduction
Welcome to Building Real-Time Marvels with Laravel: Create Dynamic and Interactive
Web Applications. This book will introduce you to the exciting world of Laravel, a
powerful PHP framework that allows developers to create cutting-edge web apps with
real-time functionality. Whether you’re a seasoned developer or just starting out, this
thorough tutorial will provide you with the knowledge and skills you need to create
remarkable and engaging web experiences with Laravel.
Because of its elegance, simplicity, and feature-rich environment, Laravel has
garnered enormous appeal in the online development community. It gives developers a
strong collection of tools and conventions that help streamline the development process,
letting them focus on creating novel features and great user experiences.
We will cover the Laravel framework in a logical and organized manner, chapter by
chapter, throughout this book. Each chapter delves further into the Laravel environment,
covering fundamental principles, advanced techniques, and best practices to help you
become an expert Laravel developer.
Our goal is to provide you with the knowledge and confidence you need to create
real-time miracles—online applications that engage users with dynamic information,
interactive interfaces, and seamless communication. This book will walk you through
the process of creating a real-time chat application, a collaborative dashboard that
displays real-time data, or any other interactive online application.
If you’re new to Laravel, don’t worry! We’ll start with an overview of the Laravel
ecosystem, covering its key principles, architecture, and vital components. You will learn
how to configure your development environment so that you have everything you need
to begin developing Laravel applications.
Fear not, those who are already familiar with Laravel! There are numerous advanced
topics available to challenge and extend your knowledge. This book covers a wide
range of subjects, from learning complicated routing strategies to fine-tuning database
interactions with Eloquent Object-Relational Mapping (ORM) to adding real-time
features with WebSockets to improving performance and scaling your applications.
Throughout the journey, you will experience practical examples, real-world use
cases, and hands-on exercises to help you understand the ideas covered. Each chapter
xxxiii
Another random document with
no related content on Scribd:
Natural History of aquatic Insects, 1895, p. 376.
[88]
[89]
Op. cit. v. 1881, p. 91; cf. Sharp, Tr. ent. Soc. London, 1882, p. 61.
[90]
[91]
[92]
[93]
[94]
[95]
[96]
Arch. Mus. Paris (2), viii. and ix. 1887.
[97]
[98]
[99]
Horn, Tr. Amer. ent. Soc. xv. 1888, p. 23; Riley, Insect Life, i. 1889,
p. 300.
[100]
[101]
[102]
Westwood, Tr. ent. Soc. London (N.S.) iii. 1855, p. 90; Wasmann,
Krit. Verzeichniss Myrmekoph. Arthropod. 1894, p. 121.
[103]
[104]
[105]
[106]
[107]
[108]
[109]
[110]
[111]
[112]
[113]
[114]
[116]
[117]
For classification, see Sharp, Biol. Centr. Amer. Col. ii. pt. i. 1894,
p. 443.
[118]
[119]
[120]
[121]
[122]
[123]
[124]
It is probable that we do not know more than the fiftieth part of the
existing species, most of which lead lives that render them very
difficult to find.
[125]
Bull. ent. ital. 1886, p. 406, and Ent. Zeit. Stettin, xliii. 1887, pp.
201-206. Emery does not mention the name of the species, but we
presume it to be the common Italian fire-fly, Luciola italica.
[126]
Zeitschr. wiss. Zool. xxxvii. 1882, p. 354; also Emery, op. cit. xl.
1884, p. 338. For another theory as to the luminescence, see
p. 259.
[127]
[128]
[129]
[130]
[131]
[132]
[133]
"Les Élatérides lumineux," Bull. Soc. Zool. France, xi. 1886; also
Leçons de Physiologie générale, Paris, 1898, and C.R. Ac. Sci.
cxxiii. 1896, p. 653.
[135]
[136]
[137]
Ann. Nat. Hist. (4) vi. 1870, p. 314; and Ent. Mag. xxvii. 1891, p.
18.
[138]
[139]
[141]
[142]
[143]
[144]
Les Insectes Vésicants, Paris 1890, 554 pp. Parts of this work
were previously published in J. de l'Anat. Phys., xxi. xxii. xxiii. 1886
and 1887.
[145]
[146]
[147]
[148]
[149]
Not a growing tree, but the instrument used for stretching boots.
[151]
[152]
[153]
[154]
[155]
Perris, Ann. Sci. Nat. (2) xiv. 1840, p. 89, pl. iii.
[156]
In the males of the genus Cedeocera the tips of the elytra are
drawn out into processes almost as long as the elytra themselves,
and rivalling the forceps of earwigs.
[157]
[159]
[160]
[161]
Ent. Meddel. v. 1896. p. 148, and Ov. Danske Selsk. 1896, p. 67.
[162]
[163]
[164]
[165]
[167]
[168]
[169]
[170]
[171]
[172]
See Cholodkovsky, Zool. Anz. ix. p. 615; Haase, t.c. p. 711; also
Riley, P. ent. Soc. Washington, ii. 1892, p. 310.
[173]
C.R. Ac. Sci. Paris, cxviii. 1894, p. 360; and his Thesis, Bordeaux,
1895.
[175]
[176]
[177]
[178]
[179]
[180]
[182]
[183]
[184]
[185]
[186]
[187]
[188]
Tr. Linn. Soc. London, Zool. 2nd Ser., v. 1890, pp. 147, 148.
[189]
[190]
Jahresber. Schlesisch. Ges. lviii. 1881, p. 116.
[191]
[192]
[193]
[194]
[195]
[196]
[197]
[198]
[199]
[200]
[202]
[203]
[204]
[205]
[206]
[207]
[208]
Stett. ent. Zeit. li. 1891, p. 264; and lvi. 1895, p. 234.
[210]
[211]
Haase first proposed the name Netrocera (Deutsche ent. Zeit. Lep.
iv. 1891, p. 1) for Hesperiidae, as a division distinct from all other
butterflies; Karsch replaced the name in the following year by
Grypocera, because Netrocera is the name of a genus.
[212]
[213]
[214]
[215]
Finn, J. Asiat. Soc. Bengal, lxvi. 1896, p. 528; lxvii. 1897, p. 213.
[217]
[218]
[219]
[220]
[221]
[222]
[223]
[224]
[225]
[226]
Ann. Soc. ent. France (4), vii. 1867, p. 665, Pl. xiii.
[227]
[228]
[229]
Ann. Nat. Hist. (6), iv. 1889, p. 213. We trust there will not be many
more Künstlers, as this beautiful butterfly must certainly become
extinct, if the female be really as rare as is supposed.
[230]
[231]
Tr. ent. Soc. London, 1893, p. 97, with Suppl. op. cit. 1896, pp. 129
and 567.
[232]
Amer. Natural. xxix. 1895, p. 1066. See also Ann. N. York Ac. viii.
1895, p. 194, and Ent. Record, 1897, pp. 136 and 196.
[233]
[234]
[235]
[236]
For explanatory diagram of the wings, see Fig. 161, I. When the
nervuration is obscured by the wing-scales, it may be rendered
temporarily visible by the application, with a camel's-hair brush, of
a little benzine. The wings may be permanently denuded of their
scales by being placed for a short time in Eau de Javelle
(hypochlorite of potash).
[237]
The genus Cyphanta (one species from India) has nervule 5 of the
fore wing proceeding from the lower angle of the cell.
[238]
[239]
See Westwood, Tr. Linn. Soc. London (2), i. 1877, p. 165, etc.
[240]
For habits of some Brazilian Castnia see Seitz, Ent. Zeit. Stettin, li.
1890, p. 258.
[241]
For pupa see Chapman, Ent. Rec. vi. 1895, pp. 286, 288.
[242]
[243]
[244]
Cotes, "Wild Silk Insects of India," Ind. Mus. Notes, ii. No. 2, 1891,
15 plates.
[245]
See on this subject Pérez, Act. Soc. Bordeaux, xlvii. 1894, p. 236,
etc.
[246]
[247]
[248]
[249]
Bar and Laboulbène, Ann. Soc. ent. France, (v.) iii. 1873, p. 300.
[250]
Op cit. (5), vii. 1877, p. 181; and Ent. Zeit. Stettin, xxxix. 1878, p.
221; and xliv. 1883, p. 402.
[251]
[252]
[253]
[254]
[255]
[256]
[257]
[258]
[259]
[260]
[261]
[262]
[263]