PHP code example of jumper423 / with-join

1. Go to this page and download the library: Download jumper423/with-join 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/ */

    

jumper423 / with-join example snippets


Model::with('other')->references('other')->orderBy('other.title', 'asc')->get();
 # this will make one sql-query with left join of 'other' relation
 # result object will be the same object
 
Model::>get();
# result is same as Model::

StreetImage::

StreetImage::with('street')->first()

StreetImage::

StreetImage::

StreetImage::

	class StreetImage extends \Eloquent
	{
		use \SleepingOwl\WithJoin\WithJoinTrait;
	}