[ PHP Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ PHP Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
601. Many-to-Many relationship के लिए किस table की आवश्यकता होती है?
[A] Pivot Table
[B] Cache Table
[C] Session Table
[D] Log Table
601. Which table is required for Many-to-Many relationships?
[A] Pivot Table
[B] Cache Table
[C] Session Table
[D] Log Table
सही उत्तर: Pivot Table
व्याख्या: दो models के बीच mapping रखती है।
Correct Answer: Pivot Table
Explanation: Stores mapping between two models.
602. Eager Loading का उद्देश्य क्या है?
[A] Reduce N+1 Queries
[B] Increase Queries
[C] Delete Records
[D] Cache Sessions
602. What is the purpose of Eager Loading?
[A] Reduce N+1 Queries
[B] Increase Queries
[C] Delete Records
[D] Cache Sessions
सही उत्तर: Reduce N+1 Queries
व्याख्या: Related data को पहले से load करता है।
Correct Answer: Reduce N+1 Queries
Explanation: Loads related data in advance.
603. Laravel में eager loading के लिए कौन-सा method प्रयोग होता है?
[A] with()
[B] loadData()
[C] join()
[D] fetch()
603. Which method is used for eager loading in Laravel?
[A] with()
[B] loadData()
[C] join()
[D] fetch()
सही उत्तर: with()
व्याख्या: Related models preload करने के लिए।
Correct Answer: with()
Explanation: Used to preload related models.
604. Soft Deletes का मुख्य लाभ क्या है?
[A] Record Recover किया जा सकता है
[B] Permanent Delete
[C] Faster Queries
[D] No Storage Required
604. What is the main benefit of Soft Deletes?
[A] Records can be recovered
[B] Permanent deletion
[C] Faster queries
[D] No storage required
सही उत्तर: Record Recover किया जा सकता है
व्याख्या: deleted_at column के माध्यम से।
Correct Answer: Records can be recovered
Explanation: Uses deleted_at column.
605. Soft Deletes enable करने के लिए कौन-सा trait उपयोग होता है?
[A] SoftDeletes
[B] DeleteTrait
[C] Recoverable
[D] Trashable
605. Which trait enables Soft Deletes?
[A] SoftDeletes
[B] DeleteTrait
[C] Recoverable
[D] Trashable
सही उत्तर: SoftDeletes
व्याख्या: Model में use SoftDeletes लगाया जाता है।
Correct Answer: SoftDeletes
Explanation: Applied in the model class.
606. Laravel Resource Controller का मुख्य उद्देश्य क्या है?
[A] CRUD Routes Automatically Generate करना
[B] Database Backup
[C] Session Encryption
[D] Asset Compilation
606. What is the main purpose of a Laravel Resource Controller?
[A] Automatically Generate CRUD Routes
[B] Database Backup
[C] Session Encryption
[D] Asset Compilation
सही उत्तर: CRUD Routes Automatically Generate करना
व्याख्या: Standard CRUD actions के लिए routes और methods प्रदान करता है।
Correct Answer: Automatically Generate CRUD Routes
Explanation: Provides routes and methods for standard CRUD operations.
607. Laravel Sanctum का मुख्य उपयोग क्या है?
[A] API Authentication
[B] Database Migration
[C] View Rendering
[D] Queue Processing
607. What is the main use of Laravel Sanctum?
[A] API Authentication
[B] Database Migration
[C] View Rendering
[D] Queue Processing
सही उत्तर: API Authentication
व्याख्या: SPA और API token authentication के लिए उपयोग होता है।
Correct Answer: API Authentication
Explanation: Used for SPA and API token authentication.
608. Laravel Passport किस protocol पर आधारित है?
[A] OAuth2
[B] JWT Only
[C] SAML
[D] LDAP
608. Laravel Passport is based on which protocol?
[A] OAuth2
[B] JWT Only
[C] SAML
[D] LDAP
सही उत्तर: OAuth2
व्याख्या: Full OAuth2 server implementation प्रदान करता है।
Correct Answer: OAuth2
Explanation: Provides a full OAuth2 server implementation.
609. Sanctum और Passport में मुख्य अंतर क्या है?
[A] Passport OAuth2 Support देता है
[B] Sanctum Database है
[C] Passport Queue System है
[D] दोनों समान हैं
609. What is the main difference between Sanctum and Passport?
[A] Passport provides OAuth2 support
[B] Sanctum is a database
[C] Passport is a queue system
[D] Both are identical
सही उत्तर: Passport OAuth2 Support देता है
व्याख्या: Passport advanced OAuth2 features प्रदान करता है।
Correct Answer: Passport provides OAuth2 support
Explanation: Passport offers advanced OAuth2 features.
610. Laravel Notification का उद्देश्य क्या है?
[A] Users को Messages भेजना
[B] Database Optimize करना
[C] Routes Generate करना
[D] Views Compile करना
610. What is the purpose of Laravel Notifications?
[A] Send messages to users
[B] Optimize database
[C] Generate routes
[D] Compile views
सही उत्तर: Users को Messages भेजना
व्याख्या: Mail, SMS, Slack आदि channels के माध्यम से।
Correct Answer: Send messages to users
Explanation: Via channels such as Mail, SMS, Slack, etc.