PHP code example of bugsheng / laravel-sql
1. Go to this page and download the library: Download bugsheng/laravel-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/ */
bugsheng / laravel-sql example snippets
// 示例查询语句
User::where('name', 'like', '%test%')->get();
// 完整sql获取
User::where('name', 'like', '%test%')->select(['*'])->sql();
// 示例查询语句
DB::table('users')->where('name', 'like', '%test%')->get();
// 完整sql获取
DB::table('users')->where('name', 'like', '%test%')->select(['*'])->sql();