PHP code example of spiderwisp / laravel-overlord

1. Go to this page and download the library: Download spiderwisp/laravel-overlord library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spiderwisp / laravel-overlord example snippets


// Count records
User::count()

// Query with conditions
User::where('role', 'CREATOR')->get()

// Work with relationships
$user = User::find(1)
$user->creator
$creator->videos()->take(5)->get()

// Aggregations
Video::where('status', 'PUBLISHED')->sum('duration')