The Proof package handles Testimonials and Case Studies, providing a robust framework- Sources: The entities (people or companies) that provide the social proof.
Proof is a package that requires module installation.
php dock package:install Proof --packagesThis command will:
- Publish the
proof.phpconfiguration file. - Create necessary database tables (
proof_*). - Register the
ProofServiceProvider.
Configuration file: App/Config/proof.php
Customer quotes, ratings, and video testimonials.
In-depth success stories with multiple sections (Problem, Solution, Results) and measurable metrics.
The entities (people or companies) that provide the social proof.
use Proof\Proof;
$testimonial = Proof::testimonial()
->source($sourceId)
->content('Anchor has transformed our workflow!')
->rating(5)
->verified()
->save();Proof::approve($testimonialId);$caseStudy = Proof::caseStudy()
->source($sourceId)
->title('Scaling with Anchor')
->slug('scaling-with-anchor')
->summary('How we achieved 300% growth.')
->save();
// Adding sections
$caseStudy->sections()->create([
'title' => 'The Challenge',
'content' => 'We were struggling with legacy systems...',
'order' => 1
]);
// Adding metrics
$caseStudy->metrics()->create([
'label' => 'Growth',
'value' => '300',
'suffix' => '%'
]);Automatically convert form submissions into testimonials.
use Proof\Proof;
use Stack\Models\Submission;
Proof::fromSubmission($submission, [
'content' => 'feedback_text',
'rating' => 'star_rating',
'name' => 'customer_name'
]);Generate secure, expiring links for customers to submit their proof.
$request = Proof::request($source);
$url = Proof::collectionUrl($request);Attach photos or videos from the Media package.
Proof::attachMedia($testimonial, $mediaId, 'photo');Proof includes a built-in state machine for testimonial approvals, integrated with the Workflow package.
use Proof\Proof;
// Start the approval process
Proof::startApprovalWorkflow($testimonial);
// Signals (typically from an admin dashboard)
Proof::approve($testimonial->id);
Proof::reject($testimonial->id);Map form fields to testimonial properties for automatic conversion.
Proof::fromSubmission($submission, [
'name' => 'customer_name',
'email' => 'customer_email',
'company' => 'business_name',
'content' => 'feedback_message',
'rating' => 'stars',
]);Track social proof engagement.
Proof::analytics()->recordView($testimonial, ['ip' => request()->ip()]);The Proof::analytics()->getMetrics() method returns an array of engagement data.
| Metric | Description |
|---|---|
views |
Total number of times the proof was displayed. |
clicks |
Number of clicks on "Learn More" or source links. |
Available in App/Config/proof.php:
form_integration: Enable/disable automatic form conversion.approval.required: Whether testimonials need approval before display.request.expiry_days: Duration for secure collection links.