PHP code example of eastwest / eloquent-to-raw-sql

1. Go to this page and download the library: Download eastwest/eloquent-to-raw-sql 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/ */

    

eastwest / eloquent-to-raw-sql example snippets



$user = User::where('id', 1)->toRawSql();


dump($user);

// "select * from `users` where `id` = 1"