PHP
8 articles in this category.
Advertisement-
How to create a REST API in Laravel: resources, validation and Sanctum tokens
Build a complete JSON API in Laravel: migration and model, an API resource controller, form request validation, API resources for the response shape, pagination and filtering, token authentication with Sanctum, and tests with real request and response output.
-
Laravel roles and permissions: Spatie package, gates and policies
Add roles and permissions to a Laravel app: install spatie/laravel-permission, create roles and permissions, protect routes with middleware, check access in code and Blade, and combine it with gates and policies. Tested on a fresh Laravel app.
-
Fundamental software engineering interview questions: fresher to experienced
The questions almost every software engineering interview contains, from 'introduce yourself' to unit tests, validation, APIs, MVC and deployment, with what interviewers look for, a sample answer structure for each, and small tested code examples.
-
Google Cloud Translation API in PHP: API key, REST client and the official library
Translate text from PHP with the Google Cloud Translation API: create a project and a restricted API key, call the Basic (v2) REST endpoint with cURL, batch and cache translations, handle errors, and use the official google/cloud-translate library (v3) in core PHP, CodeIgniter or Laravel.
-
eBay API integration in PHP: search items with the Browse API and OAuth
Search eBay listings from PHP the current way: create API keys, get an OAuth application token, call the Browse API item_summary search with cURL, show the results safely, cache the token and handle errors. Replaces the retired Finding API.
-
PHP interview questions for developers with 4+ years of experience
Twenty PHP interview questions for experienced developers with tested code: design patterns, dependency injection, code organisation, database access, background jobs, XML and JSON parsing, functional style, generators, APIs, OPcache and testing.
-
Deploy code from Git to shared hosting: cPanel, SSH keys and safe releases
Stop uploading files by FTP: deploy a PHP site from a Git repository to cPanel-style shared hosting using SSH keys, a production branch, .cpanel.yml or a post-receive hook, with rollback, secrets handling and a Laravel checklist. Git steps tested locally.
-
Basic PHP interview questions and answers for freshers
Thirty basic PHP interview questions with short answers and tested code: types, == versus ===, isset and empty, include and require, GET and POST, sessions and cookies, arrays, functions, OOP, PDO, password hashing and PHP 8 features.