Does this tool helped you in a way?
You can help the developer too.
You can donate any amount so he can maintain this tool
and his future works.       Donate
Found bugs? Submit an issue here.
Please state the SQL Statement used and the Output when submitting an issue.

Convert SQL Statement into Laravel Eloquent



Your::output('goes')->here();
Rules
  1. Use parentheses when using BETWEEN operator. e.g. SELECT * FROM t WHERE (column_name BETWEEN value1 AND value2);
  2. When using ALIAS, always use the AS linking verb. e.g. SELECT uid AS `user_id`;
  3. Always use backticks ( ` ) for aliases.
Few unsupported features:
  1. WITH operator.
  2. Some subqueries that has complex syntax will be wrapped in DB::raw.
  3. Doesn't support shorten alias e.g. SELECT first_name `First name`, last_name `Last name`, only support aliases with AS wildcard. See Rule #2.
  4. Doesn't support INSERT, DELETE and UPDATE, only supports SELECT statements.
Some unsupported features may not be listed here.