Need help for my sql query to make use of AS operator [duplicate]


I’m new to Laravel. Can anyone please let me know how to use "AS" operator for table ‘products’ in below SQL query?

$obj = new Product();
$main_data = $obj
->leftJoin('category as t2', '', '=', 'products.subcategory_id')

Source: Laravel

Categorised as controller, laravel, mysql, object, php Tagged , , , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us