All Laravel, PHP & CodeIgniter Tutorials

Browse all our Laravel 12, CodeIgniter 4, and PHP tutorials. Each guide includes working source code, best practices, and step-by-step instructions.

Showing 61–66 of 87 posts · Page 11 of 15

Laravel 11 Sanctum REST API Authentication: Complete Tutorial with Example

             Welcome to this up-to-date guide on implementing secure Laravel 11 Sanctum REST API authentication. Whether you're building a mobile app backend, a single-page application (SPA), or a simple token-based API, Laravel Sanctum remains the go-to lightweight solution in 2026. This step-by-step tutorial covers everything from installation using the modern php artisan install:api command to registration, login, protected routes, token management, and a full CRUD example. By the end, you'll have a production-ready authenticated API ready for testing in Postman or your frontend.

By Revathi M · Read

Server-Side DataTables in CodeIgniter 4: Complete AJAX Tutorial

             Server-side processing with DataTables is essential when dealing with large datasets in web applications. Instead of loading thousands of rows at once (client-side), DataTables sends AJAX requests to the server for each page, search, or sort — dramatically improving performance.

By Revathi M · Read

How to Implement Role-Based Authentication in Laravel 11 with Custom Middleware

In Laravel 11, you can easily restrict access to routes and features based on user roles without setting up multiple authentication guards. This approach uses a single web guard and a custom middleware to check a role column. It's ideal for apps needing simple user tiers (e.g., user, editor, admin) and avoids the complexity of multi-guard setups (separate logins/tables). For advanced RBAC, consider packages like Spatie Laravel-Permission.

By Revathi M · Read

How to Implement Google Login in PHP Using OAuth 2.0 (Step-by-Step Guide)

             Adding Google Login (also called "Sign in with Google") to your PHP app is one of the easiest ways to provide secure, fast authentication. Users don't need to create new accounts—they simply use their existing Google credentials. This reduces friction, boosts conversions, and leverages Google's robust security. In this updated tutorial, we'll use the official Google API Client Library for PHP to implement server-side Google OAuth 2.0 authentication. No database is required—we'll store basic user info in PHP sessions for simplicity.

By Revathi M · Read